Skip to content
Snippets Groups Projects
Commit 79e790c5 authored by Jörn Friedrich Dreyer's avatar Jörn Friedrich Dreyer
Browse files

add SIZE_ALL const

parent ff1c581d
Branches
No related tags found
No related merge requests found
......@@ -24,6 +24,11 @@ namespace OCP\Search;
*/
abstract class PagedProvider extends Provider {
/**
* show all results
*/
const SIZE_ALL = 0;
/**
* Constructor
* @param array $options
......@@ -38,15 +43,15 @@ abstract class PagedProvider extends Provider {
* @return array An array of OCP\Search\Result's
*/
public function search($query) {
// old apps might assume they get all results, so we set size 0
$this->searchPaged($query, 1, 0);
// old apps might assume they get all results, so we use SIZE_ALL
$this->searchPaged($query, 1, self::SIZE_ALL);
}
/**
* Search for $query
* @param string $query
* @param int $page pages start at page 1
* @param int $size, 0 = all
* @param int $size, 0 = SIZE_ALL
* @return array An array of OCP\Search\Result's
*/
abstract public function searchPaged($query, $page, $size);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment