diff options
author | Robin Appelman <icewind@owncloud.com> | 2012-04-14 11:29:44 +0200 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2012-04-14 11:29:54 +0200 |
commit | 3babb8c22cf5d08ad4c4d79efee26fd1fb9a8472 (patch) | |
tree | a1e466f4875a4766124427f91a5db35c57e0fffd /lib/search | |
parent | 8ed4606685f93f5fea002aecaf5279f482e78115 (diff) | |
download | nextcloud-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.php | 6 | ||||
-rw-r--r-- | lib/search/provider/file.php | 4 |
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){ |