summaryrefslogtreecommitdiffstats
path: root/lib/search
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2012-04-14 11:29:44 +0200
committerRobin Appelman <icewind@owncloud.com>2012-04-14 11:29:54 +0200
commit3babb8c22cf5d08ad4c4d79efee26fd1fb9a8472 (patch)
treea1e466f4875a4766124427f91a5db35c57e0fffd /lib/search
parent8ed4606685f93f5fea002aecaf5279f482e78115 (diff)
downloadnextcloud-server-3babb8c22cf5d08ad4c4d79efee26fd1fb9a8472.tar.gz
nextcloud-server-3babb8c22cf5d08ad4c4d79efee26fd1fb9a8472.zip
improve flexibility of search providers a bit
Diffstat (limited to 'lib/search')
-rw-r--r--lib/search/provider.php6
-rw-r--r--lib/search/provider/file.php4
2 files changed, 6 insertions, 4 deletions
diff --git a/lib/search/provider.php b/lib/search/provider.php
index 9487ca51f2b..838ab696d04 100644
--- a/lib/search/provider.php
+++ b/lib/search/provider.php
@@ -2,11 +2,13 @@
/**
* provides search functionalty
*/
-interface OC_Search_Provider {
+class OC_Search_Provider {
+ public function __construct($options){}
+
/**
* search for $query
* @param string $query
* @return array An array of OC_Search_Result's
*/
- static function search($query);
+ public function search($query){}
}
diff --git a/lib/search/provider/file.php b/lib/search/provider/file.php
index 3bdb3bcd2af..a37af495599 100644
--- a/lib/search/provider/file.php
+++ b/lib/search/provider/file.php
@@ -1,7 +1,7 @@
<?php
-class OC_Search_Provider_File implements OC_Search_Provider{
- static function search($query){
+class OC_Search_Provider_File extends OC_Search_Provider{
+ function search($query){
$files=OC_FileCache::search($query,true);
$results=array();
foreach($files as $fileData){