Provider

class OCP\Search\Provider
Provides a template for search functionality throughout ownCloud;
Source:lib/public/Search/Provider.php#35

Constants

OPTION_APPS = apps
Source:lib/public/Search/Provider.php#41
Since:8.0.0
Deprecated:20.0.0

Properties

protected static property OCP\Search\Provider::$options
List of options
Source:lib/public/Search/Provider.php#49
Type:array
Since:7.0.0
Deprecated:20.0.0

Methods

public OCP\Search\Provider::__construct($options=[])
Constructor
Source:

lib/public/Search/Provider.php#57

Parameters:
  • $options (array) as key => value
Since:

7.0.0 - default value for $options was added in 8.0.0

Deprecated:

20.0.0

public OCP\Search\Provider::getOption($key)
get a value from the options array or null
Source:

lib/public/Search/Provider.php#68

Parameters:
  • $key (string)
Returns:

mixed

Since:

8.0.0

Deprecated:

20.0.0

public OCP\Search\Provider::providesResultsFor($apps=[])
checks if the given apps and the apps this provider has results for intersect
returns true if the given array is empty (all apps)
or if this provider does not have a list of apps it provides results for (legacy search providers)
or if the two above arrays have elements in common (intersect)
Source:

lib/public/Search/Provider.php#86

Parameters:
  • $apps (string[])
Returns:

bool

Since:

8.0.0

Deprecated:

20.0.0

public abstract OCP\Search\Provider::search($query)
Search for $query
Source:

lib/public/Search/Provider.php#98

Parameters:
  • $query (string)
Returns:

array An array of OCP\Search\Result’s

Since:

7.0.0

Deprecated:

20.0.0