Nextcloud PHP API (stable18)

ISearch

Small Interface for Search

Tags
since
7.0.0

Table of Contents

clearProviders()  : mixed
Remove all registered search providers
registerProvider()  : mixed
Register a new search provider to search with
removeProvider()  : mixed
Remove one existing search provider
searchPaged()  : array
Search all providers for $query

Methods

clearProviders()

Remove all registered search providers

public clearProviders() : mixed
Tags
since
7.0.0
Return values
mixed

registerProvider()

Register a new search provider to search with

public registerProvider(string $class[, array $options = array() ]) : mixed
Parameters
$class : string

class name of a OCP\Search\Provider

$options : array = array()

optional

Tags
since
7.0.0
Return values
mixed

removeProvider()

Remove one existing search provider

public removeProvider(string $provider) : mixed
Parameters
$provider : string

class name of a OCP\Search\Provider

Tags
since
7.0.0
Return values
mixed

searchPaged()

Search all providers for $query

public searchPaged(string $query[, string[] $inApps = array() ][, int $page = 1 ][, int $size = 30 ]) : array
Parameters
$query : string
$inApps : string[] = array()

optionally limit results to the given apps

$page : int = 1

pages start at page 1

$size : int = 30
Tags
since
8.0.0
Return values
array

An array of OCP\Search\Result's

Search results