@@ -30,71 +30,71 @@ |
||
30 | 30 | use OCP\IDBConnection; |
31 | 31 | |
32 | 32 | class LoginFlowV2Mapper extends QBMapper { |
33 | - private const lifetime = 1200; |
|
33 | + private const lifetime = 1200; |
|
34 | 34 | |
35 | - /** @var ITimeFactory */ |
|
36 | - private $timeFactory; |
|
35 | + /** @var ITimeFactory */ |
|
36 | + private $timeFactory; |
|
37 | 37 | |
38 | - public function __construct(IDBConnection $db, ITimeFactory $timeFactory) { |
|
39 | - parent::__construct($db, 'login_flow_v2', LoginFlowV2::class); |
|
40 | - $this->timeFactory = $timeFactory; |
|
41 | - } |
|
38 | + public function __construct(IDBConnection $db, ITimeFactory $timeFactory) { |
|
39 | + parent::__construct($db, 'login_flow_v2', LoginFlowV2::class); |
|
40 | + $this->timeFactory = $timeFactory; |
|
41 | + } |
|
42 | 42 | |
43 | - /** |
|
44 | - * @param string $pollToken |
|
45 | - * @return LoginFlowV2 |
|
46 | - * @throws DoesNotExistException |
|
47 | - */ |
|
48 | - public function getByPollToken(string $pollToken): LoginFlowV2 { |
|
49 | - $qb = $this->db->getQueryBuilder(); |
|
50 | - $qb->select('*') |
|
51 | - ->from($this->getTableName()) |
|
52 | - ->where( |
|
53 | - $qb->expr()->eq('poll_token', $qb->createNamedParameter($pollToken)) |
|
54 | - ); |
|
43 | + /** |
|
44 | + * @param string $pollToken |
|
45 | + * @return LoginFlowV2 |
|
46 | + * @throws DoesNotExistException |
|
47 | + */ |
|
48 | + public function getByPollToken(string $pollToken): LoginFlowV2 { |
|
49 | + $qb = $this->db->getQueryBuilder(); |
|
50 | + $qb->select('*') |
|
51 | + ->from($this->getTableName()) |
|
52 | + ->where( |
|
53 | + $qb->expr()->eq('poll_token', $qb->createNamedParameter($pollToken)) |
|
54 | + ); |
|
55 | 55 | |
56 | - $entity = $this->findEntity($qb); |
|
57 | - return $this->validateTimestamp($entity); |
|
58 | - } |
|
56 | + $entity = $this->findEntity($qb); |
|
57 | + return $this->validateTimestamp($entity); |
|
58 | + } |
|
59 | 59 | |
60 | - /** |
|
61 | - * @param string $loginToken |
|
62 | - * @return LoginFlowV2 |
|
63 | - * @throws DoesNotExistException |
|
64 | - */ |
|
65 | - public function getByLoginToken(string $loginToken): LoginFlowV2 { |
|
66 | - $qb = $this->db->getQueryBuilder(); |
|
67 | - $qb->select('*') |
|
68 | - ->from($this->getTableName()) |
|
69 | - ->where( |
|
70 | - $qb->expr()->eq('login_token', $qb->createNamedParameter($loginToken)) |
|
71 | - ); |
|
60 | + /** |
|
61 | + * @param string $loginToken |
|
62 | + * @return LoginFlowV2 |
|
63 | + * @throws DoesNotExistException |
|
64 | + */ |
|
65 | + public function getByLoginToken(string $loginToken): LoginFlowV2 { |
|
66 | + $qb = $this->db->getQueryBuilder(); |
|
67 | + $qb->select('*') |
|
68 | + ->from($this->getTableName()) |
|
69 | + ->where( |
|
70 | + $qb->expr()->eq('login_token', $qb->createNamedParameter($loginToken)) |
|
71 | + ); |
|
72 | 72 | |
73 | - $entity = $this->findEntity($qb); |
|
74 | - return $this->validateTimestamp($entity); |
|
75 | - } |
|
73 | + $entity = $this->findEntity($qb); |
|
74 | + return $this->validateTimestamp($entity); |
|
75 | + } |
|
76 | 76 | |
77 | - public function cleanup(): void { |
|
78 | - $qb = $this->db->getQueryBuilder(); |
|
79 | - $qb->delete($this->getTableName()) |
|
80 | - ->where( |
|
81 | - $qb->expr()->lt('timestamp', $qb->createNamedParameter($this->timeFactory->getTime() - self::lifetime)) |
|
82 | - ); |
|
77 | + public function cleanup(): void { |
|
78 | + $qb = $this->db->getQueryBuilder(); |
|
79 | + $qb->delete($this->getTableName()) |
|
80 | + ->where( |
|
81 | + $qb->expr()->lt('timestamp', $qb->createNamedParameter($this->timeFactory->getTime() - self::lifetime)) |
|
82 | + ); |
|
83 | 83 | |
84 | - $qb->execute(); |
|
85 | - } |
|
84 | + $qb->execute(); |
|
85 | + } |
|
86 | 86 | |
87 | - /** |
|
88 | - * @param LoginFlowV2 $flowV2 |
|
89 | - * @return LoginFlowV2 |
|
90 | - * @throws DoesNotExistException |
|
91 | - */ |
|
92 | - private function validateTimestamp(LoginFlowV2 $flowV2): LoginFlowV2 { |
|
93 | - if ($flowV2->getTimestamp() < ($this->timeFactory->getTime() - self::lifetime)) { |
|
94 | - $this->delete($flowV2); |
|
95 | - throw new DoesNotExistException('Token expired'); |
|
96 | - } |
|
87 | + /** |
|
88 | + * @param LoginFlowV2 $flowV2 |
|
89 | + * @return LoginFlowV2 |
|
90 | + * @throws DoesNotExistException |
|
91 | + */ |
|
92 | + private function validateTimestamp(LoginFlowV2 $flowV2): LoginFlowV2 { |
|
93 | + if ($flowV2->getTimestamp() < ($this->timeFactory->getTime() - self::lifetime)) { |
|
94 | + $this->delete($flowV2); |
|
95 | + throw new DoesNotExistException('Token expired'); |
|
96 | + } |
|
97 | 97 | |
98 | - return $flowV2; |
|
99 | - } |
|
98 | + return $flowV2; |
|
99 | + } |
|
100 | 100 | } |
@@ -27,12 +27,12 @@ |
||
27 | 27 | * Allow the backend to mark groups to be excluded from being shown in search dialogs |
28 | 28 | */ |
29 | 29 | interface IHideFromCollaborationBackend { |
30 | - /** |
|
31 | - * Check if a group should be hidden from search dialogs |
|
32 | - * |
|
33 | - * @param string $groupId |
|
34 | - * @return bool |
|
35 | - * @since 16.0.0 |
|
36 | - */ |
|
37 | - public function hideGroup(string $groupId): bool; |
|
30 | + /** |
|
31 | + * Check if a group should be hidden from search dialogs |
|
32 | + * |
|
33 | + * @param string $groupId |
|
34 | + * @return bool |
|
35 | + * @since 16.0.0 |
|
36 | + */ |
|
37 | + public function hideGroup(string $groupId): bool; |
|
38 | 38 | } |
@@ -30,70 +30,70 @@ |
||
30 | 30 | */ |
31 | 31 | class AutoCompleteEvent extends GenericEvent { |
32 | 32 | |
33 | - /** |
|
34 | - * @param array $arguments |
|
35 | - * @since 16.0.0 |
|
36 | - */ |
|
37 | - public function __construct(array $arguments) { |
|
38 | - parent::__construct(null, $arguments); |
|
39 | - } |
|
33 | + /** |
|
34 | + * @param array $arguments |
|
35 | + * @since 16.0.0 |
|
36 | + */ |
|
37 | + public function __construct(array $arguments) { |
|
38 | + parent::__construct(null, $arguments); |
|
39 | + } |
|
40 | 40 | |
41 | - /** |
|
42 | - * @since 16.0.0 |
|
43 | - */ |
|
44 | - public function getResults(): array { |
|
45 | - return $this->getArgument('results'); |
|
46 | - } |
|
41 | + /** |
|
42 | + * @since 16.0.0 |
|
43 | + */ |
|
44 | + public function getResults(): array { |
|
45 | + return $this->getArgument('results'); |
|
46 | + } |
|
47 | 47 | |
48 | - /** |
|
49 | - * @param array $results |
|
50 | - * @since 16.0.0 |
|
51 | - */ |
|
52 | - public function setResults(array $results): void { |
|
53 | - $this->setArgument('results', $results); |
|
54 | - } |
|
48 | + /** |
|
49 | + * @param array $results |
|
50 | + * @since 16.0.0 |
|
51 | + */ |
|
52 | + public function setResults(array $results): void { |
|
53 | + $this->setArgument('results', $results); |
|
54 | + } |
|
55 | 55 | |
56 | - /** |
|
57 | - * @since 16.0.0 |
|
58 | - */ |
|
59 | - public function getSearchTerm(): string { |
|
60 | - return $this->getArgument('search'); |
|
61 | - } |
|
56 | + /** |
|
57 | + * @since 16.0.0 |
|
58 | + */ |
|
59 | + public function getSearchTerm(): string { |
|
60 | + return $this->getArgument('search'); |
|
61 | + } |
|
62 | 62 | |
63 | - /** |
|
64 | - * @return int[] |
|
65 | - * @since 16.0.0 |
|
66 | - */ |
|
67 | - public function getShareTypes(): array { |
|
68 | - return $this->getArgument('shareTypes'); |
|
69 | - } |
|
63 | + /** |
|
64 | + * @return int[] |
|
65 | + * @since 16.0.0 |
|
66 | + */ |
|
67 | + public function getShareTypes(): array { |
|
68 | + return $this->getArgument('shareTypes'); |
|
69 | + } |
|
70 | 70 | |
71 | - /** |
|
72 | - * @since 16.0.0 |
|
73 | - */ |
|
74 | - public function getItemType(): string { |
|
75 | - return $this->getArgument('itemType'); |
|
76 | - } |
|
71 | + /** |
|
72 | + * @since 16.0.0 |
|
73 | + */ |
|
74 | + public function getItemType(): string { |
|
75 | + return $this->getArgument('itemType'); |
|
76 | + } |
|
77 | 77 | |
78 | - /** |
|
79 | - * @since 16.0.0 |
|
80 | - */ |
|
81 | - public function getItemId(): string { |
|
82 | - return $this->getArgument('itemId'); |
|
83 | - } |
|
78 | + /** |
|
79 | + * @since 16.0.0 |
|
80 | + */ |
|
81 | + public function getItemId(): string { |
|
82 | + return $this->getArgument('itemId'); |
|
83 | + } |
|
84 | 84 | |
85 | - /** |
|
86 | - * @since 16.0.0 |
|
87 | - */ |
|
88 | - public function getSorter(): string { |
|
89 | - return $this->getArgument('sorter'); |
|
90 | - } |
|
85 | + /** |
|
86 | + * @since 16.0.0 |
|
87 | + */ |
|
88 | + public function getSorter(): string { |
|
89 | + return $this->getArgument('sorter'); |
|
90 | + } |
|
91 | 91 | |
92 | - /** |
|
93 | - * @since 16.0.0 |
|
94 | - */ |
|
95 | - public function getLimit(): int { |
|
96 | - return $this->getArgument('limit'); |
|
97 | - } |
|
92 | + /** |
|
93 | + * @since 16.0.0 |
|
94 | + */ |
|
95 | + public function getLimit(): int { |
|
96 | + return $this->getArgument('limit'); |
|
97 | + } |
|
98 | 98 | |
99 | 99 | } |
@@ -26,119 +26,119 @@ |
||
26 | 26 | use OCP\Files\NotFoundException; |
27 | 27 | |
28 | 28 | class NonExistingFile extends File { |
29 | - /** |
|
30 | - * @param string $newPath |
|
31 | - * @throws \OCP\Files\NotFoundException |
|
32 | - */ |
|
33 | - public function rename($newPath) { |
|
34 | - throw new NotFoundException(); |
|
35 | - } |
|
36 | - |
|
37 | - public function delete() { |
|
38 | - throw new NotFoundException(); |
|
39 | - } |
|
40 | - |
|
41 | - public function copy($newPath) { |
|
42 | - throw new NotFoundException(); |
|
43 | - } |
|
44 | - |
|
45 | - public function touch($mtime = null) { |
|
46 | - throw new NotFoundException(); |
|
47 | - } |
|
48 | - |
|
49 | - public function getId() { |
|
50 | - if ($this->fileInfo) { |
|
51 | - return parent::getId(); |
|
52 | - } else { |
|
53 | - throw new NotFoundException(); |
|
54 | - } |
|
55 | - } |
|
56 | - |
|
57 | - public function stat() { |
|
58 | - throw new NotFoundException(); |
|
59 | - } |
|
60 | - |
|
61 | - public function getMTime() { |
|
62 | - if ($this->fileInfo) { |
|
63 | - return parent::getMTime(); |
|
64 | - } else { |
|
65 | - throw new NotFoundException(); |
|
66 | - } |
|
67 | - } |
|
68 | - |
|
69 | - public function getSize($includeMounts = true) { |
|
70 | - if ($this->fileInfo) { |
|
71 | - return parent::getSize($includeMounts); |
|
72 | - } else { |
|
73 | - throw new NotFoundException(); |
|
74 | - } |
|
75 | - } |
|
76 | - |
|
77 | - public function getEtag() { |
|
78 | - if ($this->fileInfo) { |
|
79 | - return parent::getEtag(); |
|
80 | - } else { |
|
81 | - throw new NotFoundException(); |
|
82 | - } |
|
83 | - } |
|
84 | - |
|
85 | - public function getPermissions() { |
|
86 | - if ($this->fileInfo) { |
|
87 | - return parent::getPermissions(); |
|
88 | - } else { |
|
89 | - throw new NotFoundException(); |
|
90 | - } |
|
91 | - } |
|
92 | - |
|
93 | - public function isReadable() { |
|
94 | - if ($this->fileInfo) { |
|
95 | - return parent::isReadable(); |
|
96 | - } else { |
|
97 | - throw new NotFoundException(); |
|
98 | - } |
|
99 | - } |
|
100 | - |
|
101 | - public function isUpdateable() { |
|
102 | - if ($this->fileInfo) { |
|
103 | - return parent::isUpdateable(); |
|
104 | - } else { |
|
105 | - throw new NotFoundException(); |
|
106 | - } |
|
107 | - } |
|
108 | - |
|
109 | - public function isDeletable() { |
|
110 | - if ($this->fileInfo) { |
|
111 | - return parent::isDeletable(); |
|
112 | - } else { |
|
113 | - throw new NotFoundException(); |
|
114 | - } |
|
115 | - } |
|
116 | - |
|
117 | - public function isShareable() { |
|
118 | - if ($this->fileInfo) { |
|
119 | - return parent::isShareable(); |
|
120 | - } else { |
|
121 | - throw new NotFoundException(); |
|
122 | - } |
|
123 | - } |
|
124 | - |
|
125 | - public function getContent() { |
|
126 | - throw new NotFoundException(); |
|
127 | - } |
|
128 | - |
|
129 | - public function putContent($data) { |
|
130 | - throw new NotFoundException(); |
|
131 | - } |
|
132 | - |
|
133 | - public function getMimeType() { |
|
134 | - if ($this->fileInfo) { |
|
135 | - return parent::getMimeType(); |
|
136 | - } else { |
|
137 | - throw new NotFoundException(); |
|
138 | - } |
|
139 | - } |
|
140 | - |
|
141 | - public function fopen($mode) { |
|
142 | - throw new NotFoundException(); |
|
143 | - } |
|
29 | + /** |
|
30 | + * @param string $newPath |
|
31 | + * @throws \OCP\Files\NotFoundException |
|
32 | + */ |
|
33 | + public function rename($newPath) { |
|
34 | + throw new NotFoundException(); |
|
35 | + } |
|
36 | + |
|
37 | + public function delete() { |
|
38 | + throw new NotFoundException(); |
|
39 | + } |
|
40 | + |
|
41 | + public function copy($newPath) { |
|
42 | + throw new NotFoundException(); |
|
43 | + } |
|
44 | + |
|
45 | + public function touch($mtime = null) { |
|
46 | + throw new NotFoundException(); |
|
47 | + } |
|
48 | + |
|
49 | + public function getId() { |
|
50 | + if ($this->fileInfo) { |
|
51 | + return parent::getId(); |
|
52 | + } else { |
|
53 | + throw new NotFoundException(); |
|
54 | + } |
|
55 | + } |
|
56 | + |
|
57 | + public function stat() { |
|
58 | + throw new NotFoundException(); |
|
59 | + } |
|
60 | + |
|
61 | + public function getMTime() { |
|
62 | + if ($this->fileInfo) { |
|
63 | + return parent::getMTime(); |
|
64 | + } else { |
|
65 | + throw new NotFoundException(); |
|
66 | + } |
|
67 | + } |
|
68 | + |
|
69 | + public function getSize($includeMounts = true) { |
|
70 | + if ($this->fileInfo) { |
|
71 | + return parent::getSize($includeMounts); |
|
72 | + } else { |
|
73 | + throw new NotFoundException(); |
|
74 | + } |
|
75 | + } |
|
76 | + |
|
77 | + public function getEtag() { |
|
78 | + if ($this->fileInfo) { |
|
79 | + return parent::getEtag(); |
|
80 | + } else { |
|
81 | + throw new NotFoundException(); |
|
82 | + } |
|
83 | + } |
|
84 | + |
|
85 | + public function getPermissions() { |
|
86 | + if ($this->fileInfo) { |
|
87 | + return parent::getPermissions(); |
|
88 | + } else { |
|
89 | + throw new NotFoundException(); |
|
90 | + } |
|
91 | + } |
|
92 | + |
|
93 | + public function isReadable() { |
|
94 | + if ($this->fileInfo) { |
|
95 | + return parent::isReadable(); |
|
96 | + } else { |
|
97 | + throw new NotFoundException(); |
|
98 | + } |
|
99 | + } |
|
100 | + |
|
101 | + public function isUpdateable() { |
|
102 | + if ($this->fileInfo) { |
|
103 | + return parent::isUpdateable(); |
|
104 | + } else { |
|
105 | + throw new NotFoundException(); |
|
106 | + } |
|
107 | + } |
|
108 | + |
|
109 | + public function isDeletable() { |
|
110 | + if ($this->fileInfo) { |
|
111 | + return parent::isDeletable(); |
|
112 | + } else { |
|
113 | + throw new NotFoundException(); |
|
114 | + } |
|
115 | + } |
|
116 | + |
|
117 | + public function isShareable() { |
|
118 | + if ($this->fileInfo) { |
|
119 | + return parent::isShareable(); |
|
120 | + } else { |
|
121 | + throw new NotFoundException(); |
|
122 | + } |
|
123 | + } |
|
124 | + |
|
125 | + public function getContent() { |
|
126 | + throw new NotFoundException(); |
|
127 | + } |
|
128 | + |
|
129 | + public function putContent($data) { |
|
130 | + throw new NotFoundException(); |
|
131 | + } |
|
132 | + |
|
133 | + public function getMimeType() { |
|
134 | + if ($this->fileInfo) { |
|
135 | + return parent::getMimeType(); |
|
136 | + } else { |
|
137 | + throw new NotFoundException(); |
|
138 | + } |
|
139 | + } |
|
140 | + |
|
141 | + public function fopen($mode) { |
|
142 | + throw new NotFoundException(); |
|
143 | + } |
|
144 | 144 | } |
@@ -27,18 +27,18 @@ |
||
27 | 27 | use Symfony\Component\EventDispatcher\EventDispatcherInterface; |
28 | 28 | |
29 | 29 | class Listener { |
30 | - public static function register(EventDispatcherInterface $dispatcher): void { |
|
31 | - $dispatcher->addListener('OCP\Share::postShare', [self::class, 'shareModification']); |
|
32 | - $dispatcher->addListener('OCP\Share::postUnshare', [self::class, 'shareModification']); |
|
33 | - $dispatcher->addListener('OCP\Share::postUnshareFromSelf', [self::class, 'shareModification']); |
|
34 | - } |
|
30 | + public static function register(EventDispatcherInterface $dispatcher): void { |
|
31 | + $dispatcher->addListener('OCP\Share::postShare', [self::class, 'shareModification']); |
|
32 | + $dispatcher->addListener('OCP\Share::postUnshare', [self::class, 'shareModification']); |
|
33 | + $dispatcher->addListener('OCP\Share::postUnshareFromSelf', [self::class, 'shareModification']); |
|
34 | + } |
|
35 | 35 | |
36 | - public static function shareModification(): void { |
|
37 | - /** @var IManager $resourceManager */ |
|
38 | - $resourceManager = \OC::$server->query(IManager::class); |
|
39 | - /** @var ResourceProvider $resourceProvider */ |
|
40 | - $resourceProvider = \OC::$server->query(ResourceProvider::class); |
|
36 | + public static function shareModification(): void { |
|
37 | + /** @var IManager $resourceManager */ |
|
38 | + $resourceManager = \OC::$server->query(IManager::class); |
|
39 | + /** @var ResourceProvider $resourceProvider */ |
|
40 | + $resourceProvider = \OC::$server->query(ResourceProvider::class); |
|
41 | 41 | |
42 | - $resourceManager->invalidateAccessCacheForProvider($resourceProvider); |
|
43 | - } |
|
42 | + $resourceManager->invalidateAccessCacheForProvider($resourceProvider); |
|
43 | + } |
|
44 | 44 | } |
@@ -29,53 +29,53 @@ |
||
29 | 29 | */ |
30 | 30 | interface ICollection { |
31 | 31 | |
32 | - /** |
|
33 | - * @return int |
|
34 | - * @since 16.0.0 |
|
35 | - */ |
|
36 | - public function getId(): int; |
|
32 | + /** |
|
33 | + * @return int |
|
34 | + * @since 16.0.0 |
|
35 | + */ |
|
36 | + public function getId(): int; |
|
37 | 37 | |
38 | - /** |
|
39 | - * @return string |
|
40 | - * @since 16.0.0 |
|
41 | - */ |
|
42 | - public function getName(): string; |
|
38 | + /** |
|
39 | + * @return string |
|
40 | + * @since 16.0.0 |
|
41 | + */ |
|
42 | + public function getName(): string; |
|
43 | 43 | |
44 | - /** |
|
45 | - * @param string $name |
|
46 | - * @since 16.0.0 |
|
47 | - */ |
|
48 | - public function setName(string $name): void; |
|
44 | + /** |
|
45 | + * @param string $name |
|
46 | + * @since 16.0.0 |
|
47 | + */ |
|
48 | + public function setName(string $name): void; |
|
49 | 49 | |
50 | - /** |
|
51 | - * @return IResource[] |
|
52 | - * @since 16.0.0 |
|
53 | - */ |
|
54 | - public function getResources(): array; |
|
50 | + /** |
|
51 | + * @return IResource[] |
|
52 | + * @since 16.0.0 |
|
53 | + */ |
|
54 | + public function getResources(): array; |
|
55 | 55 | |
56 | - /** |
|
57 | - * Adds a resource to a collection |
|
58 | - * |
|
59 | - * @param IResource $resource |
|
60 | - * @throws ResourceException when the resource is already part of the collection |
|
61 | - * @since 16.0.0 |
|
62 | - */ |
|
63 | - public function addResource(IResource $resource): void; |
|
56 | + /** |
|
57 | + * Adds a resource to a collection |
|
58 | + * |
|
59 | + * @param IResource $resource |
|
60 | + * @throws ResourceException when the resource is already part of the collection |
|
61 | + * @since 16.0.0 |
|
62 | + */ |
|
63 | + public function addResource(IResource $resource): void; |
|
64 | 64 | |
65 | - /** |
|
66 | - * Removes a resource from a collection |
|
67 | - * |
|
68 | - * @param IResource $resource |
|
69 | - * @since 16.0.0 |
|
70 | - */ |
|
71 | - public function removeResource(IResource $resource): void; |
|
65 | + /** |
|
66 | + * Removes a resource from a collection |
|
67 | + * |
|
68 | + * @param IResource $resource |
|
69 | + * @since 16.0.0 |
|
70 | + */ |
|
71 | + public function removeResource(IResource $resource): void; |
|
72 | 72 | |
73 | - /** |
|
74 | - * Can a user/guest access the collection |
|
75 | - * |
|
76 | - * @param IUser|null $user |
|
77 | - * @return bool |
|
78 | - * @since 16.0.0 |
|
79 | - */ |
|
80 | - public function canAccess(?IUser $user): bool; |
|
73 | + /** |
|
74 | + * Can a user/guest access the collection |
|
75 | + * |
|
76 | + * @param IUser|null $user |
|
77 | + * @return bool |
|
78 | + * @since 16.0.0 |
|
79 | + */ |
|
80 | + public function canAccess(?IUser $user): bool; |
|
81 | 81 | } |
@@ -62,118 +62,118 @@ |
||
62 | 62 | interface ISearchTemplate { |
63 | 63 | |
64 | 64 | |
65 | - /** |
|
66 | - * Set the class of the icon to be displayed in the left panel of the |
|
67 | - * FullTextSearch navigation page, in front of the related Content Provider. |
|
68 | - * |
|
69 | - * @since 16.0.0 |
|
70 | - * |
|
71 | - * @param string $class |
|
72 | - * |
|
73 | - * @return ISearchTemplate |
|
74 | - */ |
|
75 | - public function setIcon(string $class): ISearchTemplate; |
|
76 | - |
|
77 | - /** |
|
78 | - * Get the class of the icon. |
|
79 | - * |
|
80 | - * @since 16.0.0 |
|
81 | - * |
|
82 | - * @return string |
|
83 | - */ |
|
84 | - public function getIcon(): string; |
|
85 | - |
|
86 | - |
|
87 | - /** |
|
88 | - * Set the path of a CSS file that will be loaded when needed. |
|
89 | - * |
|
90 | - * @since 16.0.0 |
|
91 | - * |
|
92 | - * @param string $css |
|
93 | - * |
|
94 | - * @return ISearchTemplate |
|
95 | - */ |
|
96 | - public function setCss(string $css): ISearchTemplate; |
|
97 | - |
|
98 | - /** |
|
99 | - * Get the path of the CSS file. |
|
100 | - * |
|
101 | - * @since 16.0.0 |
|
102 | - * |
|
103 | - * @return string |
|
104 | - */ |
|
105 | - public function getCss(): string; |
|
106 | - |
|
107 | - |
|
108 | - /** |
|
109 | - * Set the path of the file of a template that the HTML will be displayed |
|
110 | - * below the Options. |
|
111 | - * This should only be used if your Content Provider needs to set options in |
|
112 | - * a way not generated by FullTextSearch |
|
113 | - * |
|
114 | - * @since 16.0.0 |
|
115 | - * |
|
116 | - * @param string $template |
|
117 | - * |
|
118 | - * @return ISearchTemplate |
|
119 | - */ |
|
120 | - public function setTemplate(string $template): ISearchTemplate; |
|
121 | - |
|
122 | - /** |
|
123 | - * Get the path of the template file. |
|
124 | - * |
|
125 | - * @since 16.0.0 |
|
126 | - * |
|
127 | - * @return string |
|
128 | - */ |
|
129 | - public function getTemplate(): string; |
|
130 | - |
|
131 | - |
|
132 | - /** |
|
133 | - * Add an option in the Panel that is displayed when the user start a search |
|
134 | - * within the app that generate the content. |
|
135 | - * |
|
136 | - * @see ISearchOption |
|
137 | - * |
|
138 | - * @since 16.0.0 |
|
139 | - * |
|
140 | - * @param ISearchOption $option |
|
141 | - * |
|
142 | - * @return ISearchTemplate |
|
143 | - */ |
|
144 | - public function addPanelOption(ISearchOption $option): ISearchTemplate; |
|
145 | - |
|
146 | - /** |
|
147 | - * Get all options to be displayed in the Panel. |
|
148 | - * |
|
149 | - * @since 16.0.0 |
|
150 | - * |
|
151 | - * @return ISearchOption[] |
|
152 | - */ |
|
153 | - public function getPanelOptions(): array; |
|
154 | - |
|
155 | - |
|
156 | - /** |
|
157 | - * Add an option in the left panel of the FullTextSearch navigation page. |
|
158 | - * |
|
159 | - * @see ISearchOption |
|
160 | - * |
|
161 | - * @since 16.0.0 |
|
162 | - * |
|
163 | - * @param ISearchOption $option |
|
164 | - * |
|
165 | - * @return ISearchTemplate |
|
166 | - */ |
|
167 | - public function addNavigationOption(ISearchOption $option): ISearchTemplate; |
|
168 | - |
|
169 | - /** |
|
170 | - * Get all options to be displayed in the FullTextSearch navigation page. |
|
171 | - * |
|
172 | - * @since 16.0.0 |
|
173 | - * |
|
174 | - * @return array |
|
175 | - */ |
|
176 | - public function getNavigationOptions(): array; |
|
65 | + /** |
|
66 | + * Set the class of the icon to be displayed in the left panel of the |
|
67 | + * FullTextSearch navigation page, in front of the related Content Provider. |
|
68 | + * |
|
69 | + * @since 16.0.0 |
|
70 | + * |
|
71 | + * @param string $class |
|
72 | + * |
|
73 | + * @return ISearchTemplate |
|
74 | + */ |
|
75 | + public function setIcon(string $class): ISearchTemplate; |
|
76 | + |
|
77 | + /** |
|
78 | + * Get the class of the icon. |
|
79 | + * |
|
80 | + * @since 16.0.0 |
|
81 | + * |
|
82 | + * @return string |
|
83 | + */ |
|
84 | + public function getIcon(): string; |
|
85 | + |
|
86 | + |
|
87 | + /** |
|
88 | + * Set the path of a CSS file that will be loaded when needed. |
|
89 | + * |
|
90 | + * @since 16.0.0 |
|
91 | + * |
|
92 | + * @param string $css |
|
93 | + * |
|
94 | + * @return ISearchTemplate |
|
95 | + */ |
|
96 | + public function setCss(string $css): ISearchTemplate; |
|
97 | + |
|
98 | + /** |
|
99 | + * Get the path of the CSS file. |
|
100 | + * |
|
101 | + * @since 16.0.0 |
|
102 | + * |
|
103 | + * @return string |
|
104 | + */ |
|
105 | + public function getCss(): string; |
|
106 | + |
|
107 | + |
|
108 | + /** |
|
109 | + * Set the path of the file of a template that the HTML will be displayed |
|
110 | + * below the Options. |
|
111 | + * This should only be used if your Content Provider needs to set options in |
|
112 | + * a way not generated by FullTextSearch |
|
113 | + * |
|
114 | + * @since 16.0.0 |
|
115 | + * |
|
116 | + * @param string $template |
|
117 | + * |
|
118 | + * @return ISearchTemplate |
|
119 | + */ |
|
120 | + public function setTemplate(string $template): ISearchTemplate; |
|
121 | + |
|
122 | + /** |
|
123 | + * Get the path of the template file. |
|
124 | + * |
|
125 | + * @since 16.0.0 |
|
126 | + * |
|
127 | + * @return string |
|
128 | + */ |
|
129 | + public function getTemplate(): string; |
|
130 | + |
|
131 | + |
|
132 | + /** |
|
133 | + * Add an option in the Panel that is displayed when the user start a search |
|
134 | + * within the app that generate the content. |
|
135 | + * |
|
136 | + * @see ISearchOption |
|
137 | + * |
|
138 | + * @since 16.0.0 |
|
139 | + * |
|
140 | + * @param ISearchOption $option |
|
141 | + * |
|
142 | + * @return ISearchTemplate |
|
143 | + */ |
|
144 | + public function addPanelOption(ISearchOption $option): ISearchTemplate; |
|
145 | + |
|
146 | + /** |
|
147 | + * Get all options to be displayed in the Panel. |
|
148 | + * |
|
149 | + * @since 16.0.0 |
|
150 | + * |
|
151 | + * @return ISearchOption[] |
|
152 | + */ |
|
153 | + public function getPanelOptions(): array; |
|
154 | + |
|
155 | + |
|
156 | + /** |
|
157 | + * Add an option in the left panel of the FullTextSearch navigation page. |
|
158 | + * |
|
159 | + * @see ISearchOption |
|
160 | + * |
|
161 | + * @since 16.0.0 |
|
162 | + * |
|
163 | + * @param ISearchOption $option |
|
164 | + * |
|
165 | + * @return ISearchTemplate |
|
166 | + */ |
|
167 | + public function addNavigationOption(ISearchOption $option): ISearchTemplate; |
|
168 | + |
|
169 | + /** |
|
170 | + * Get all options to be displayed in the FullTextSearch navigation page. |
|
171 | + * |
|
172 | + * @since 16.0.0 |
|
173 | + * |
|
174 | + * @return array |
|
175 | + */ |
|
176 | + public function getNavigationOptions(): array; |
|
177 | 177 | |
178 | 178 | } |
179 | 179 |
@@ -54,211 +54,211 @@ |
||
54 | 54 | interface IDocumentAccess { |
55 | 55 | |
56 | 56 | |
57 | - /** |
|
58 | - * Owner of the document can be set at the init of the object. |
|
59 | - * |
|
60 | - * @since 16.0.0 |
|
61 | - * |
|
62 | - * IDocumentAccess constructor. |
|
63 | - * |
|
64 | - * @param string $ownerId |
|
65 | - */ |
|
66 | - public function __construct(string $ownerId = ''); |
|
67 | - |
|
68 | - |
|
69 | - /** |
|
70 | - * Set the Owner of the document. |
|
71 | - * |
|
72 | - * @since 16.0.0 |
|
73 | - * |
|
74 | - * @param string $ownerId |
|
75 | - * |
|
76 | - * @return IDocumentAccess |
|
77 | - */ |
|
78 | - public function setOwnerId(string $ownerId): IDocumentAccess; |
|
79 | - |
|
80 | - /** |
|
81 | - * Get the Owner of the document. |
|
82 | - * |
|
83 | - * @since 16.0.0 |
|
84 | - * |
|
85 | - * @return string |
|
86 | - */ |
|
87 | - public function getOwnerId(): string; |
|
88 | - |
|
89 | - |
|
90 | - /** |
|
91 | - * Set the viewer of the document. |
|
92 | - * |
|
93 | - * @since 16.0.0 |
|
94 | - * |
|
95 | - * @param string $viewerId |
|
96 | - * |
|
97 | - * @return IDocumentAccess |
|
98 | - */ |
|
99 | - public function setViewerId(string $viewerId): IDocumentAccess; |
|
100 | - |
|
101 | - /** |
|
102 | - * Get the viewer of the document. |
|
103 | - * |
|
104 | - * @since 16.0.0 |
|
105 | - * |
|
106 | - * @return string |
|
107 | - */ |
|
108 | - public function getViewerId(): string; |
|
109 | - |
|
110 | - |
|
111 | - /** |
|
112 | - * Set the list of users that have read access to the document. |
|
113 | - * |
|
114 | - * @since 16.0.0 |
|
115 | - * |
|
116 | - * @param array $users |
|
117 | - * |
|
118 | - * @return IDocumentAccess |
|
119 | - */ |
|
120 | - public function setUsers(array $users): IDocumentAccess; |
|
121 | - |
|
122 | - /** |
|
123 | - * Add an entry to the list of users that have read access to the document. |
|
124 | - * |
|
125 | - * @since 16.0.0 |
|
126 | - * |
|
127 | - * @param string $user |
|
128 | - * |
|
129 | - * @return IDocumentAccess |
|
130 | - */ |
|
131 | - public function addUser(string $user): IDocumentAccess; |
|
132 | - |
|
133 | - /** |
|
134 | - * Add multiple entries to the list of users that have read access to the |
|
135 | - * document. |
|
136 | - * |
|
137 | - * @since 16.0.0 |
|
138 | - * |
|
139 | - * @param array $users |
|
140 | - * |
|
141 | - * @return IDocumentAccess |
|
142 | - */ |
|
143 | - public function addUsers($users): IDocumentAccess; |
|
144 | - |
|
145 | - /** |
|
146 | - * Get the complete list of users that have read access to the document. |
|
147 | - * |
|
148 | - * @since 16.0.0 |
|
149 | - * |
|
150 | - * @return array |
|
151 | - */ |
|
152 | - public function getUsers(): array; |
|
153 | - |
|
154 | - |
|
155 | - /** |
|
156 | - * Set the list of groups that have read access to the document. |
|
157 | - * |
|
158 | - * @since 16.0.0 |
|
159 | - * |
|
160 | - * @param array $groups |
|
161 | - * |
|
162 | - * @return IDocumentAccess |
|
163 | - */ |
|
164 | - public function setGroups(array $groups): IDocumentAccess; |
|
165 | - |
|
166 | - /** |
|
167 | - * Add an entry to the list of groups that have read access to the document. |
|
168 | - * |
|
169 | - * @since 16.0.0 |
|
170 | - * |
|
171 | - * @param string $group |
|
172 | - * |
|
173 | - * @return IDocumentAccess |
|
174 | - */ |
|
175 | - public function addGroup(string $group): IDocumentAccess; |
|
176 | - |
|
177 | - /** |
|
178 | - * Add multiple entries to the list of groups that have read access to the |
|
179 | - * document. |
|
180 | - * |
|
181 | - * @since 16.0.0 |
|
182 | - * |
|
183 | - * @param array $groups |
|
184 | - * |
|
185 | - * @return IDocumentAccess |
|
186 | - */ |
|
187 | - public function addGroups(array $groups); |
|
188 | - |
|
189 | - /** |
|
190 | - * Get the complete list of groups that have read access to the document. |
|
191 | - * |
|
192 | - * @since 16.0.0 |
|
193 | - * |
|
194 | - * @return array |
|
195 | - */ |
|
196 | - public function getGroups(): array; |
|
197 | - |
|
198 | - |
|
199 | - /** |
|
200 | - * Set the list of circles that have read access to the document. |
|
201 | - * |
|
202 | - * @since 16.0.0 |
|
203 | - * |
|
204 | - * @param array $circles |
|
205 | - * |
|
206 | - * @return IDocumentAccess |
|
207 | - */ |
|
208 | - public function setCircles(array $circles): IDocumentAccess; |
|
209 | - |
|
210 | - /** |
|
211 | - * Add an entry to the list of circles that have read access to the document. |
|
212 | - * |
|
213 | - * @since 16.0.0 |
|
214 | - * |
|
215 | - * @param string $circle |
|
216 | - * |
|
217 | - * @return IDocumentAccess |
|
218 | - */ |
|
219 | - public function addCircle(string $circle): IDocumentAccess; |
|
220 | - |
|
221 | - /** |
|
222 | - * Add multiple entries to the list of groups that have read access to the |
|
223 | - * document. |
|
224 | - * |
|
225 | - * @since 16.0.0 |
|
226 | - * |
|
227 | - * @param array $circles |
|
228 | - * |
|
229 | - * @return IDocumentAccess |
|
230 | - */ |
|
231 | - public function addCircles(array $circles): IDocumentAccess; |
|
232 | - |
|
233 | - /** |
|
234 | - * Get the complete list of circles that have read access to the document. |
|
235 | - * |
|
236 | - * @since 16.0.0 |
|
237 | - * |
|
238 | - * @return array |
|
239 | - */ |
|
240 | - public function getCircles(): array; |
|
241 | - |
|
242 | - |
|
243 | - /** |
|
244 | - * Set the list of links that have read access to the document. |
|
245 | - * |
|
246 | - * @since 16.0.0 |
|
247 | - * |
|
248 | - * @param array $links |
|
249 | - * |
|
250 | - * @return IDocumentAccess |
|
251 | - */ |
|
252 | - public function setLinks(array $links): IDocumentAccess; |
|
253 | - |
|
254 | - /** |
|
255 | - * Get the list of links that have read access to the document. |
|
256 | - * |
|
257 | - * @since 16.0.0 |
|
258 | - * |
|
259 | - * @return array |
|
260 | - */ |
|
261 | - public function getLinks(): array; |
|
57 | + /** |
|
58 | + * Owner of the document can be set at the init of the object. |
|
59 | + * |
|
60 | + * @since 16.0.0 |
|
61 | + * |
|
62 | + * IDocumentAccess constructor. |
|
63 | + * |
|
64 | + * @param string $ownerId |
|
65 | + */ |
|
66 | + public function __construct(string $ownerId = ''); |
|
67 | + |
|
68 | + |
|
69 | + /** |
|
70 | + * Set the Owner of the document. |
|
71 | + * |
|
72 | + * @since 16.0.0 |
|
73 | + * |
|
74 | + * @param string $ownerId |
|
75 | + * |
|
76 | + * @return IDocumentAccess |
|
77 | + */ |
|
78 | + public function setOwnerId(string $ownerId): IDocumentAccess; |
|
79 | + |
|
80 | + /** |
|
81 | + * Get the Owner of the document. |
|
82 | + * |
|
83 | + * @since 16.0.0 |
|
84 | + * |
|
85 | + * @return string |
|
86 | + */ |
|
87 | + public function getOwnerId(): string; |
|
88 | + |
|
89 | + |
|
90 | + /** |
|
91 | + * Set the viewer of the document. |
|
92 | + * |
|
93 | + * @since 16.0.0 |
|
94 | + * |
|
95 | + * @param string $viewerId |
|
96 | + * |
|
97 | + * @return IDocumentAccess |
|
98 | + */ |
|
99 | + public function setViewerId(string $viewerId): IDocumentAccess; |
|
100 | + |
|
101 | + /** |
|
102 | + * Get the viewer of the document. |
|
103 | + * |
|
104 | + * @since 16.0.0 |
|
105 | + * |
|
106 | + * @return string |
|
107 | + */ |
|
108 | + public function getViewerId(): string; |
|
109 | + |
|
110 | + |
|
111 | + /** |
|
112 | + * Set the list of users that have read access to the document. |
|
113 | + * |
|
114 | + * @since 16.0.0 |
|
115 | + * |
|
116 | + * @param array $users |
|
117 | + * |
|
118 | + * @return IDocumentAccess |
|
119 | + */ |
|
120 | + public function setUsers(array $users): IDocumentAccess; |
|
121 | + |
|
122 | + /** |
|
123 | + * Add an entry to the list of users that have read access to the document. |
|
124 | + * |
|
125 | + * @since 16.0.0 |
|
126 | + * |
|
127 | + * @param string $user |
|
128 | + * |
|
129 | + * @return IDocumentAccess |
|
130 | + */ |
|
131 | + public function addUser(string $user): IDocumentAccess; |
|
132 | + |
|
133 | + /** |
|
134 | + * Add multiple entries to the list of users that have read access to the |
|
135 | + * document. |
|
136 | + * |
|
137 | + * @since 16.0.0 |
|
138 | + * |
|
139 | + * @param array $users |
|
140 | + * |
|
141 | + * @return IDocumentAccess |
|
142 | + */ |
|
143 | + public function addUsers($users): IDocumentAccess; |
|
144 | + |
|
145 | + /** |
|
146 | + * Get the complete list of users that have read access to the document. |
|
147 | + * |
|
148 | + * @since 16.0.0 |
|
149 | + * |
|
150 | + * @return array |
|
151 | + */ |
|
152 | + public function getUsers(): array; |
|
153 | + |
|
154 | + |
|
155 | + /** |
|
156 | + * Set the list of groups that have read access to the document. |
|
157 | + * |
|
158 | + * @since 16.0.0 |
|
159 | + * |
|
160 | + * @param array $groups |
|
161 | + * |
|
162 | + * @return IDocumentAccess |
|
163 | + */ |
|
164 | + public function setGroups(array $groups): IDocumentAccess; |
|
165 | + |
|
166 | + /** |
|
167 | + * Add an entry to the list of groups that have read access to the document. |
|
168 | + * |
|
169 | + * @since 16.0.0 |
|
170 | + * |
|
171 | + * @param string $group |
|
172 | + * |
|
173 | + * @return IDocumentAccess |
|
174 | + */ |
|
175 | + public function addGroup(string $group): IDocumentAccess; |
|
176 | + |
|
177 | + /** |
|
178 | + * Add multiple entries to the list of groups that have read access to the |
|
179 | + * document. |
|
180 | + * |
|
181 | + * @since 16.0.0 |
|
182 | + * |
|
183 | + * @param array $groups |
|
184 | + * |
|
185 | + * @return IDocumentAccess |
|
186 | + */ |
|
187 | + public function addGroups(array $groups); |
|
188 | + |
|
189 | + /** |
|
190 | + * Get the complete list of groups that have read access to the document. |
|
191 | + * |
|
192 | + * @since 16.0.0 |
|
193 | + * |
|
194 | + * @return array |
|
195 | + */ |
|
196 | + public function getGroups(): array; |
|
197 | + |
|
198 | + |
|
199 | + /** |
|
200 | + * Set the list of circles that have read access to the document. |
|
201 | + * |
|
202 | + * @since 16.0.0 |
|
203 | + * |
|
204 | + * @param array $circles |
|
205 | + * |
|
206 | + * @return IDocumentAccess |
|
207 | + */ |
|
208 | + public function setCircles(array $circles): IDocumentAccess; |
|
209 | + |
|
210 | + /** |
|
211 | + * Add an entry to the list of circles that have read access to the document. |
|
212 | + * |
|
213 | + * @since 16.0.0 |
|
214 | + * |
|
215 | + * @param string $circle |
|
216 | + * |
|
217 | + * @return IDocumentAccess |
|
218 | + */ |
|
219 | + public function addCircle(string $circle): IDocumentAccess; |
|
220 | + |
|
221 | + /** |
|
222 | + * Add multiple entries to the list of groups that have read access to the |
|
223 | + * document. |
|
224 | + * |
|
225 | + * @since 16.0.0 |
|
226 | + * |
|
227 | + * @param array $circles |
|
228 | + * |
|
229 | + * @return IDocumentAccess |
|
230 | + */ |
|
231 | + public function addCircles(array $circles): IDocumentAccess; |
|
232 | + |
|
233 | + /** |
|
234 | + * Get the complete list of circles that have read access to the document. |
|
235 | + * |
|
236 | + * @since 16.0.0 |
|
237 | + * |
|
238 | + * @return array |
|
239 | + */ |
|
240 | + public function getCircles(): array; |
|
241 | + |
|
242 | + |
|
243 | + /** |
|
244 | + * Set the list of links that have read access to the document. |
|
245 | + * |
|
246 | + * @since 16.0.0 |
|
247 | + * |
|
248 | + * @param array $links |
|
249 | + * |
|
250 | + * @return IDocumentAccess |
|
251 | + */ |
|
252 | + public function setLinks(array $links): IDocumentAccess; |
|
253 | + |
|
254 | + /** |
|
255 | + * Get the list of links that have read access to the document. |
|
256 | + * |
|
257 | + * @since 16.0.0 |
|
258 | + * |
|
259 | + * @return array |
|
260 | + */ |
|
261 | + public function getLinks(): array; |
|
262 | 262 | |
263 | 263 | } |
264 | 264 |
@@ -56,143 +56,143 @@ |
||
56 | 56 | interface ISearchResult { |
57 | 57 | |
58 | 58 | |
59 | - /** |
|
60 | - * Get the original SearchRequest. |
|
61 | - * |
|
62 | - * @see ISearchRequest |
|
63 | - * |
|
64 | - * @since 15.0.0 |
|
65 | - * |
|
66 | - * @return ISearchRequest |
|
67 | - */ |
|
68 | - public function getRequest(): ISearchRequest; |
|
69 | - |
|
70 | - /** |
|
71 | - * Get the targeted Content Provider. |
|
72 | - * |
|
73 | - * @since 15.0.0 |
|
74 | - * |
|
75 | - * @return IFullTextSearchProvider |
|
76 | - */ |
|
77 | - public function getProvider(): IFullTextSearchProvider; |
|
78 | - |
|
79 | - |
|
80 | - /** |
|
81 | - * Add an IIndexDocument as one of the result of the search request. |
|
82 | - * |
|
83 | - * @since 15.0.0 |
|
84 | - * |
|
85 | - * @param IIndexDocument $document |
|
86 | - * |
|
87 | - * @return ISearchResult |
|
88 | - */ |
|
89 | - public function addDocument(IIndexDocument $document): ISearchResult; |
|
90 | - |
|
91 | - /** |
|
92 | - * Returns all result of the search request, in an array of IIndexDocument. |
|
93 | - * |
|
94 | - * @since 15.0.0 |
|
95 | - * |
|
96 | - * @return IIndexDocument[] |
|
97 | - */ |
|
98 | - public function getDocuments(): array; |
|
99 | - |
|
100 | - /** |
|
101 | - * Set an array of IIndexDocument as the result of the search request. |
|
102 | - * |
|
103 | - * @since 15.0.0 |
|
104 | - * |
|
105 | - * @param IIndexDocument[] $documents |
|
106 | - * |
|
107 | - * @return ISearchResult |
|
108 | - */ |
|
109 | - public function setDocuments(array $documents): ISearchResult; |
|
110 | - |
|
111 | - |
|
112 | - /** |
|
113 | - * Add an aggregation to the result. |
|
114 | - * |
|
115 | - * @since 15.0.0 |
|
116 | - * |
|
117 | - * @param string $category |
|
118 | - * @param string $value |
|
119 | - * @param int $count |
|
120 | - * |
|
121 | - * @return ISearchResult |
|
122 | - */ |
|
123 | - public function addAggregation(string $category, string $value, int $count): ISearchResult; |
|
124 | - |
|
125 | - /** |
|
126 | - * Get all aggregations. |
|
127 | - * |
|
128 | - * @since 15.0.0 |
|
129 | - * |
|
130 | - * @param string $category |
|
131 | - * |
|
132 | - * @return array |
|
133 | - */ |
|
134 | - public function getAggregations(string $category): array; |
|
135 | - |
|
136 | - |
|
137 | - /** |
|
138 | - * Set the raw result of the request. |
|
139 | - * |
|
140 | - * @since 15.0.0 |
|
141 | - * |
|
142 | - * @param string $result |
|
143 | - * |
|
144 | - * @return ISearchResult |
|
145 | - */ |
|
146 | - public function setRawResult(string $result): ISearchResult; |
|
147 | - |
|
148 | - |
|
149 | - /** |
|
150 | - * Set the total number of results for the search request. |
|
151 | - * Used by pagination. |
|
152 | - * |
|
153 | - * @since 15.0.0 |
|
154 | - * |
|
155 | - * @param int $total |
|
156 | - * |
|
157 | - * @return ISearchResult |
|
158 | - */ |
|
159 | - public function setTotal(int $total): ISearchResult; |
|
160 | - |
|
161 | - |
|
162 | - /** |
|
163 | - * Set the top score for the search request. |
|
164 | - * |
|
165 | - * @since 15.0.0 |
|
166 | - * |
|
167 | - * @param int $score |
|
168 | - * |
|
169 | - * @return ISearchResult |
|
170 | - */ |
|
171 | - public function setMaxScore(int $score): ISearchResult; |
|
172 | - |
|
173 | - |
|
174 | - /** |
|
175 | - * Set the time spent by the request to perform the search. |
|
176 | - * |
|
177 | - * @since 15.0.0 |
|
178 | - * |
|
179 | - * @param int $time |
|
180 | - * |
|
181 | - * @return ISearchResult |
|
182 | - */ |
|
183 | - public function setTime(int $time): ISearchResult; |
|
184 | - |
|
185 | - |
|
186 | - /** |
|
187 | - * Set to true if the request timed out. |
|
188 | - * |
|
189 | - * @since 15.0.0 |
|
190 | - * |
|
191 | - * @param bool $timedOut |
|
192 | - * |
|
193 | - * @return ISearchResult |
|
194 | - */ |
|
195 | - public function setTimedOut(bool $timedOut): ISearchResult; |
|
59 | + /** |
|
60 | + * Get the original SearchRequest. |
|
61 | + * |
|
62 | + * @see ISearchRequest |
|
63 | + * |
|
64 | + * @since 15.0.0 |
|
65 | + * |
|
66 | + * @return ISearchRequest |
|
67 | + */ |
|
68 | + public function getRequest(): ISearchRequest; |
|
69 | + |
|
70 | + /** |
|
71 | + * Get the targeted Content Provider. |
|
72 | + * |
|
73 | + * @since 15.0.0 |
|
74 | + * |
|
75 | + * @return IFullTextSearchProvider |
|
76 | + */ |
|
77 | + public function getProvider(): IFullTextSearchProvider; |
|
78 | + |
|
79 | + |
|
80 | + /** |
|
81 | + * Add an IIndexDocument as one of the result of the search request. |
|
82 | + * |
|
83 | + * @since 15.0.0 |
|
84 | + * |
|
85 | + * @param IIndexDocument $document |
|
86 | + * |
|
87 | + * @return ISearchResult |
|
88 | + */ |
|
89 | + public function addDocument(IIndexDocument $document): ISearchResult; |
|
90 | + |
|
91 | + /** |
|
92 | + * Returns all result of the search request, in an array of IIndexDocument. |
|
93 | + * |
|
94 | + * @since 15.0.0 |
|
95 | + * |
|
96 | + * @return IIndexDocument[] |
|
97 | + */ |
|
98 | + public function getDocuments(): array; |
|
99 | + |
|
100 | + /** |
|
101 | + * Set an array of IIndexDocument as the result of the search request. |
|
102 | + * |
|
103 | + * @since 15.0.0 |
|
104 | + * |
|
105 | + * @param IIndexDocument[] $documents |
|
106 | + * |
|
107 | + * @return ISearchResult |
|
108 | + */ |
|
109 | + public function setDocuments(array $documents): ISearchResult; |
|
110 | + |
|
111 | + |
|
112 | + /** |
|
113 | + * Add an aggregation to the result. |
|
114 | + * |
|
115 | + * @since 15.0.0 |
|
116 | + * |
|
117 | + * @param string $category |
|
118 | + * @param string $value |
|
119 | + * @param int $count |
|
120 | + * |
|
121 | + * @return ISearchResult |
|
122 | + */ |
|
123 | + public function addAggregation(string $category, string $value, int $count): ISearchResult; |
|
124 | + |
|
125 | + /** |
|
126 | + * Get all aggregations. |
|
127 | + * |
|
128 | + * @since 15.0.0 |
|
129 | + * |
|
130 | + * @param string $category |
|
131 | + * |
|
132 | + * @return array |
|
133 | + */ |
|
134 | + public function getAggregations(string $category): array; |
|
135 | + |
|
136 | + |
|
137 | + /** |
|
138 | + * Set the raw result of the request. |
|
139 | + * |
|
140 | + * @since 15.0.0 |
|
141 | + * |
|
142 | + * @param string $result |
|
143 | + * |
|
144 | + * @return ISearchResult |
|
145 | + */ |
|
146 | + public function setRawResult(string $result): ISearchResult; |
|
147 | + |
|
148 | + |
|
149 | + /** |
|
150 | + * Set the total number of results for the search request. |
|
151 | + * Used by pagination. |
|
152 | + * |
|
153 | + * @since 15.0.0 |
|
154 | + * |
|
155 | + * @param int $total |
|
156 | + * |
|
157 | + * @return ISearchResult |
|
158 | + */ |
|
159 | + public function setTotal(int $total): ISearchResult; |
|
160 | + |
|
161 | + |
|
162 | + /** |
|
163 | + * Set the top score for the search request. |
|
164 | + * |
|
165 | + * @since 15.0.0 |
|
166 | + * |
|
167 | + * @param int $score |
|
168 | + * |
|
169 | + * @return ISearchResult |
|
170 | + */ |
|
171 | + public function setMaxScore(int $score): ISearchResult; |
|
172 | + |
|
173 | + |
|
174 | + /** |
|
175 | + * Set the time spent by the request to perform the search. |
|
176 | + * |
|
177 | + * @since 15.0.0 |
|
178 | + * |
|
179 | + * @param int $time |
|
180 | + * |
|
181 | + * @return ISearchResult |
|
182 | + */ |
|
183 | + public function setTime(int $time): ISearchResult; |
|
184 | + |
|
185 | + |
|
186 | + /** |
|
187 | + * Set to true if the request timed out. |
|
188 | + * |
|
189 | + * @since 15.0.0 |
|
190 | + * |
|
191 | + * @param bool $timedOut |
|
192 | + * |
|
193 | + * @return ISearchResult |
|
194 | + */ |
|
195 | + public function setTimedOut(bool $timedOut): ISearchResult; |
|
196 | 196 | |
197 | 197 | } |
198 | 198 |