From df2063ee7b49d051f9081c6fd416dd8791358ada Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Thu, 2 Feb 2017 18:20:08 +0100 Subject: Implement webdav SEARCH Signed-off-by: Robin Appelman --- lib/private/Files/Search/SearchQuery.php | 57 ++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) (limited to 'lib/private/Files/Search/SearchQuery.php') diff --git a/lib/private/Files/Search/SearchQuery.php b/lib/private/Files/Search/SearchQuery.php index a017d3e245b..8a0478ae98e 100644 --- a/lib/private/Files/Search/SearchQuery.php +++ b/lib/private/Files/Search/SearchQuery.php @@ -21,3 +21,60 @@ namespace OC\Files\Search; +use OCP\Files\Search\ISearchOperator; +use OCP\Files\Search\ISearchOrder; +use OCP\Files\Search\ISearchQuery; + +class SearchQuery implements ISearchQuery { + /** @var ISearchOperator */ + private $searchOperation; + /** @var integer */ + private $limit; + /** @var integer */ + private $offset; + /** @var ISearchOrder[] */ + private $order; + + /** + * SearchQuery constructor. + * + * @param ISearchOperator $searchOperation + * @param int $limit + * @param int $offset + * @param array $order + */ + public function __construct(ISearchOperator $searchOperation, $limit, $offset, array $order) { + $this->searchOperation = $searchOperation; + $this->limit = $limit; + $this->offset = $offset; + $this->order = $order; + } + + /** + * @return ISearchOperator + */ + public function getSearchOperation() { + return $this->searchOperation; + } + + /** + * @return int + */ + public function getLimit() { + return $this->limit; + } + + /** + * @return int + */ + public function getOffset() { + return $this->offset; + } + + /** + * @return ISearchOrder[] + */ + public function getOrder() { + return $this->order; + } +} -- cgit v1.2.3