Nextcloud PHP API (master)

PagedProvider extends Provider
in package

AbstractYes

Provides a template for search functionality throughout ownCloud;

Tags
since
8.0.0

Table of Contents

Constants

OPTION_APPS  = 'apps'
SIZE_ALL  = 0
show all results

Properties

$options  : array<string|int, mixed>
List of options

Methods

__construct()  : mixed
Constructor
getOption()  : mixed
get a value from the options array or null
providesResultsFor()  : bool
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)
search()  : array<string|int, mixed>
Search for $query
searchPaged()  : array<string|int, mixed>
Search for $query

Constants

OPTION_APPS

public mixed OPTION_APPS = 'apps'
Tags
since
8.0.0

SIZE_ALL

show all results

public mixed SIZE_ALL = 0
Tags
since
8.0.0

Properties

$options

List of options

protected array<string|int, mixed> $options
Tags
since
7.0.0

Methods

__construct()

Constructor

public __construct(array<string|int, mixed> $options) : mixed
Parameters
$options : array<string|int, mixed>
Tags
since
8.0.0

getOption()

get a value from the options array or null

public getOption(string $key) : mixed
Parameters
$key : string
Tags
since
8.0.0

providesResultsFor()

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)

public providesResultsFor([array<string|int, string> $apps = [] ]) : bool
Parameters
$apps : array<string|int, string> = []
Tags
since
8.0.0
Return values
bool

Search for $query

public search(string $query) : array<string|int, mixed>
Parameters
$query : string
Tags
since
8.0.0
Return values
array<string|int, mixed>

An array of OCP\Search\Result's

searchPaged()

Search for $query

public abstract searchPaged(string $query, int $page, int $size) : array<string|int, mixed>
Parameters
$query : string
$page : int

pages start at page 1

$size : int

0 = SIZE_ALL

Tags
since
8.0.0
Return values
array<string|int, mixed>

An array of OCP\Search\Result's


        
On this page

Search results