From d1dcd7893cb878263b8179bab16d101036c57a88 Mon Sep 17 00:00:00 2001 From: Bart Visscher Date: Thu, 1 Mar 2012 22:58:44 +0100 Subject: Search: Change provider registration to class name, for lazy loading of search providers --- lib/search/provider.php | 8 ++------ lib/search/provider/file.php | 4 ++-- 2 files changed, 4 insertions(+), 8 deletions(-) (limited to 'lib/search') diff --git a/lib/search/provider.php b/lib/search/provider.php index cceed8b04a3..9487ca51f2b 100644 --- a/lib/search/provider.php +++ b/lib/search/provider.php @@ -2,15 +2,11 @@ /** * provides search functionalty */ -abstract class OC_Search_Provider{ - public function __construct(){ - OC_Search::registerProvider($this); - } - +interface OC_Search_Provider { /** * search for $query * @param string $query * @return array An array of OC_Search_Result's */ - abstract function search($query); + static function search($query); } diff --git a/lib/search/provider/file.php b/lib/search/provider/file.php index a37af495599..3bdb3bcd2af 100644 --- a/lib/search/provider/file.php +++ b/lib/search/provider/file.php @@ -1,7 +1,7 @@