summaryrefslogtreecommitdiffstats
path: root/lib/private/Search/SearchQuery.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/Search/SearchQuery.php')
-rw-r--r--lib/private/Search/SearchQuery.php28
1 files changed, 27 insertions, 1 deletions
diff --git a/lib/private/Search/SearchQuery.php b/lib/private/Search/SearchQuery.php
index 186b4ccf18f..7ba63de90ec 100644
--- a/lib/private/Search/SearchQuery.php
+++ b/lib/private/Search/SearchQuery.php
@@ -42,20 +42,32 @@ class SearchQuery implements ISearchQuery {
/** @var int|string|null */
private $cursor;
+ /** @var string */
+ private $route;
+
+ /** @var array */
+ private $routeParameters;
+
/**
* @param string $term
* @param int $sortOrder
* @param int $limit
* @param int|string|null $cursor
+ * @param string $route
+ * @param array $routeParameters
*/
public function __construct(string $term,
int $sortOrder = ISearchQuery::SORT_DATE_DESC,
int $limit = self::LIMIT_DEFAULT,
- $cursor = null) {
+ $cursor = null,
+ string $route = '',
+ array $routeParameters = []) {
$this->term = $term;
$this->sortOrder = $sortOrder;
$this->limit = $limit;
$this->cursor = $cursor;
+ $this->route = $route;
+ $this->routeParameters = $routeParameters;
}
/**
@@ -85,4 +97,18 @@ class SearchQuery implements ISearchQuery {
public function getCursor() {
return $this->cursor;
}
+
+ /**
+ * @inheritDoc
+ */
+ public function getRoute(): string {
+ return $this->route;
+ }
+
+ /**
+ * @inheritDoc
+ */
+ public function getRouteParameters(): array {
+ return $this->routeParameters;
+ }
}