@@ -33,130 +33,130 @@ |
||
33 | 33 | * |
34 | 34 | */ |
35 | 35 | interface ISearchOption { |
36 | - /** |
|
37 | - * @since 16.0.0 |
|
38 | - */ |
|
39 | - public const CHECKBOX = 'checkbox'; |
|
40 | - |
|
41 | - /** |
|
42 | - * @since 16.0.0 |
|
43 | - */ |
|
44 | - public const INPUT = 'input'; |
|
45 | - |
|
46 | - /** |
|
47 | - * @since 16.0.0 |
|
48 | - */ |
|
49 | - public const INPUT_SMALL = 'small'; |
|
50 | - |
|
51 | - |
|
52 | - /** |
|
53 | - * Set the name/key of the option. |
|
54 | - * The string should only contains alphanumerical chars and underscore. |
|
55 | - * The key can be retrieve when using ISearchRequest::getOption |
|
56 | - * |
|
57 | - * @see ISearchRequest::getOption |
|
58 | - * |
|
59 | - * @since 16.0.0 |
|
60 | - * |
|
61 | - * @param string $name |
|
62 | - * |
|
63 | - * @return ISearchOption |
|
64 | - */ |
|
65 | - public function setName(string $name): ISearchOption; |
|
66 | - |
|
67 | - /** |
|
68 | - * Get the name/key of the option. |
|
69 | - * |
|
70 | - * @since 16.0.0 |
|
71 | - * |
|
72 | - * @return string |
|
73 | - */ |
|
74 | - public function getName(): string; |
|
75 | - |
|
76 | - |
|
77 | - /** |
|
78 | - * Set the title/display name of the option. |
|
79 | - * |
|
80 | - * @since 16.0.0 |
|
81 | - * |
|
82 | - * @param string $title |
|
83 | - * |
|
84 | - * @return ISearchOption |
|
85 | - */ |
|
86 | - public function setTitle(string $title): ISearchOption; |
|
87 | - |
|
88 | - /** |
|
89 | - * Get the title of the option. |
|
90 | - * |
|
91 | - * @since 16.0.0 |
|
92 | - * |
|
93 | - * @return string |
|
94 | - */ |
|
95 | - public function getTitle(): string; |
|
96 | - |
|
97 | - |
|
98 | - /** |
|
99 | - * Set the type of the option. |
|
100 | - * $type can be ISearchOption::CHECKBOX or ISearchOption::INPUT |
|
101 | - * |
|
102 | - * @since 16.0.0 |
|
103 | - * |
|
104 | - * @param string $type |
|
105 | - * |
|
106 | - * @return ISearchOption |
|
107 | - */ |
|
108 | - public function setType(string $type): ISearchOption; |
|
109 | - |
|
110 | - /** |
|
111 | - * Get the type of the option. |
|
112 | - * |
|
113 | - * @since 16.0.0 |
|
114 | - * |
|
115 | - * @return string |
|
116 | - */ |
|
117 | - public function getType(): string; |
|
118 | - |
|
119 | - |
|
120 | - /** |
|
121 | - * In case of Type is INPUT, set the size of the input field. |
|
122 | - * Value can be ISearchOption::INPUT_SMALL or not defined. |
|
123 | - * |
|
124 | - * @since 16.0.0 |
|
125 | - * |
|
126 | - * @param string $size |
|
127 | - * |
|
128 | - * @return ISearchOption |
|
129 | - */ |
|
130 | - public function setSize(string $size): ISearchOption; |
|
131 | - |
|
132 | - /** |
|
133 | - * Get the size of the INPUT. |
|
134 | - * |
|
135 | - * @since 16.0.0 |
|
136 | - * |
|
137 | - * @return string |
|
138 | - */ |
|
139 | - public function getSize(): string; |
|
140 | - |
|
141 | - |
|
142 | - /** |
|
143 | - * In case of Type is , set the placeholder to be displayed in the input |
|
144 | - * field. |
|
145 | - * |
|
146 | - * @since 16.0.0 |
|
147 | - * |
|
148 | - * @param string $placeholder |
|
149 | - * |
|
150 | - * @return ISearchOption |
|
151 | - */ |
|
152 | - public function setPlaceholder(string $placeholder): ISearchOption; |
|
153 | - |
|
154 | - /** |
|
155 | - * Get the placeholder. |
|
156 | - * |
|
157 | - * @since 16.0.0 |
|
158 | - * |
|
159 | - * @return string |
|
160 | - */ |
|
161 | - public function getPlaceholder(): string; |
|
36 | + /** |
|
37 | + * @since 16.0.0 |
|
38 | + */ |
|
39 | + public const CHECKBOX = 'checkbox'; |
|
40 | + |
|
41 | + /** |
|
42 | + * @since 16.0.0 |
|
43 | + */ |
|
44 | + public const INPUT = 'input'; |
|
45 | + |
|
46 | + /** |
|
47 | + * @since 16.0.0 |
|
48 | + */ |
|
49 | + public const INPUT_SMALL = 'small'; |
|
50 | + |
|
51 | + |
|
52 | + /** |
|
53 | + * Set the name/key of the option. |
|
54 | + * The string should only contains alphanumerical chars and underscore. |
|
55 | + * The key can be retrieve when using ISearchRequest::getOption |
|
56 | + * |
|
57 | + * @see ISearchRequest::getOption |
|
58 | + * |
|
59 | + * @since 16.0.0 |
|
60 | + * |
|
61 | + * @param string $name |
|
62 | + * |
|
63 | + * @return ISearchOption |
|
64 | + */ |
|
65 | + public function setName(string $name): ISearchOption; |
|
66 | + |
|
67 | + /** |
|
68 | + * Get the name/key of the option. |
|
69 | + * |
|
70 | + * @since 16.0.0 |
|
71 | + * |
|
72 | + * @return string |
|
73 | + */ |
|
74 | + public function getName(): string; |
|
75 | + |
|
76 | + |
|
77 | + /** |
|
78 | + * Set the title/display name of the option. |
|
79 | + * |
|
80 | + * @since 16.0.0 |
|
81 | + * |
|
82 | + * @param string $title |
|
83 | + * |
|
84 | + * @return ISearchOption |
|
85 | + */ |
|
86 | + public function setTitle(string $title): ISearchOption; |
|
87 | + |
|
88 | + /** |
|
89 | + * Get the title of the option. |
|
90 | + * |
|
91 | + * @since 16.0.0 |
|
92 | + * |
|
93 | + * @return string |
|
94 | + */ |
|
95 | + public function getTitle(): string; |
|
96 | + |
|
97 | + |
|
98 | + /** |
|
99 | + * Set the type of the option. |
|
100 | + * $type can be ISearchOption::CHECKBOX or ISearchOption::INPUT |
|
101 | + * |
|
102 | + * @since 16.0.0 |
|
103 | + * |
|
104 | + * @param string $type |
|
105 | + * |
|
106 | + * @return ISearchOption |
|
107 | + */ |
|
108 | + public function setType(string $type): ISearchOption; |
|
109 | + |
|
110 | + /** |
|
111 | + * Get the type of the option. |
|
112 | + * |
|
113 | + * @since 16.0.0 |
|
114 | + * |
|
115 | + * @return string |
|
116 | + */ |
|
117 | + public function getType(): string; |
|
118 | + |
|
119 | + |
|
120 | + /** |
|
121 | + * In case of Type is INPUT, set the size of the input field. |
|
122 | + * Value can be ISearchOption::INPUT_SMALL or not defined. |
|
123 | + * |
|
124 | + * @since 16.0.0 |
|
125 | + * |
|
126 | + * @param string $size |
|
127 | + * |
|
128 | + * @return ISearchOption |
|
129 | + */ |
|
130 | + public function setSize(string $size): ISearchOption; |
|
131 | + |
|
132 | + /** |
|
133 | + * Get the size of the INPUT. |
|
134 | + * |
|
135 | + * @since 16.0.0 |
|
136 | + * |
|
137 | + * @return string |
|
138 | + */ |
|
139 | + public function getSize(): string; |
|
140 | + |
|
141 | + |
|
142 | + /** |
|
143 | + * In case of Type is , set the placeholder to be displayed in the input |
|
144 | + * field. |
|
145 | + * |
|
146 | + * @since 16.0.0 |
|
147 | + * |
|
148 | + * @param string $placeholder |
|
149 | + * |
|
150 | + * @return ISearchOption |
|
151 | + */ |
|
152 | + public function setPlaceholder(string $placeholder): ISearchOption; |
|
153 | + |
|
154 | + /** |
|
155 | + * Get the placeholder. |
|
156 | + * |
|
157 | + * @since 16.0.0 |
|
158 | + * |
|
159 | + * @return string |
|
160 | + */ |
|
161 | + public function getPlaceholder(): string; |
|
162 | 162 | } |
@@ -43,315 +43,315 @@ |
||
43 | 43 | * |
44 | 44 | */ |
45 | 45 | interface ISearchRequest { |
46 | - /** |
|
47 | - * Get the maximum number of results to be returns by the Search Platform. |
|
48 | - * |
|
49 | - * @since 15.0.0 |
|
50 | - * |
|
51 | - * @return int |
|
52 | - */ |
|
53 | - public function getSize(): int; |
|
54 | - |
|
55 | - |
|
56 | - /** |
|
57 | - * Get the current page. |
|
58 | - * Used by pagination. |
|
59 | - * |
|
60 | - * @since 15.0.0 |
|
61 | - * |
|
62 | - * @return int |
|
63 | - */ |
|
64 | - public function getPage(): int; |
|
65 | - |
|
66 | - |
|
67 | - /** |
|
68 | - * Get the author of the request. |
|
69 | - * |
|
70 | - * @since 15.0.0 |
|
71 | - * |
|
72 | - * @return string |
|
73 | - */ |
|
74 | - public function getAuthor(): string; |
|
75 | - |
|
76 | - /** |
|
77 | - * Get the searched string. |
|
78 | - * |
|
79 | - * @since 15.0.0 |
|
80 | - * |
|
81 | - * @return string |
|
82 | - */ |
|
83 | - public function getSearch(): string; |
|
84 | - |
|
85 | - /** |
|
86 | - * Set the searched string. |
|
87 | - * |
|
88 | - * @param string $search |
|
89 | - * |
|
90 | - * @since 17.0.0 |
|
91 | - * |
|
92 | - * @return ISearchRequest |
|
93 | - */ |
|
94 | - public function setSearch(string $search): ISearchRequest; |
|
95 | - |
|
96 | - /** |
|
97 | - * Extends the searched string. |
|
98 | - * |
|
99 | - * @since 17.0.0 |
|
100 | - * |
|
101 | - * @param string $search |
|
102 | - * |
|
103 | - * @return ISearchRequest |
|
104 | - */ |
|
105 | - public function addSearch(string $search): ISearchRequest; |
|
106 | - |
|
107 | - |
|
108 | - /** |
|
109 | - * Get the value of an option (as string). |
|
110 | - * |
|
111 | - * @since 15.0.0 |
|
112 | - * |
|
113 | - * @param string $option |
|
114 | - * @param string $default |
|
115 | - * |
|
116 | - * @return string |
|
117 | - */ |
|
118 | - public function getOption(string $option, string $default = ''): string; |
|
119 | - |
|
120 | - /** |
|
121 | - * Get the value of an option (as array). |
|
122 | - * |
|
123 | - * @since 15.0.0 |
|
124 | - * |
|
125 | - * @param string $option |
|
126 | - * @param array $default |
|
127 | - * |
|
128 | - * @return array |
|
129 | - */ |
|
130 | - public function getOptionArray(string $option, array $default = []): array; |
|
131 | - |
|
132 | - |
|
133 | - /** |
|
134 | - * Limit the search to a part of the document. |
|
135 | - * |
|
136 | - * @since 15.0.0 |
|
137 | - * |
|
138 | - * @param string $part |
|
139 | - * |
|
140 | - * @return ISearchRequest |
|
141 | - */ |
|
142 | - public function addPart(string $part): ISearchRequest; |
|
143 | - |
|
144 | - /** |
|
145 | - * Limit the search to an array of parts of the document. |
|
146 | - * |
|
147 | - * @since 15.0.0 |
|
148 | - * |
|
149 | - * @param array $parts |
|
150 | - * |
|
151 | - * @return ISearchRequest |
|
152 | - */ |
|
153 | - public function setParts(array $parts): ISearchRequest; |
|
154 | - |
|
155 | - /** |
|
156 | - * Get the parts the search is limited to. |
|
157 | - * |
|
158 | - * @since 15.0.0 |
|
159 | - * |
|
160 | - * @return array |
|
161 | - */ |
|
162 | - public function getParts(): array; |
|
163 | - |
|
164 | - |
|
165 | - /** |
|
166 | - * Limit the search to a specific meta tag. |
|
167 | - * |
|
168 | - * @since 15.0.0 |
|
169 | - * |
|
170 | - * @param string $tag |
|
171 | - * |
|
172 | - * @return ISearchRequest |
|
173 | - */ |
|
174 | - public function addMetaTag(string $tag): ISearchRequest; |
|
175 | - |
|
176 | - /** |
|
177 | - * Get the meta tags the search is limited to. |
|
178 | - * |
|
179 | - * @since 15.0.0 |
|
180 | - * |
|
181 | - * @return array |
|
182 | - */ |
|
183 | - public function getMetaTags(): array; |
|
184 | - |
|
185 | - /** |
|
186 | - * Limit the search to an array of meta tags. |
|
187 | - * |
|
188 | - * @since 15.0.0 |
|
189 | - * |
|
190 | - * @param array $tags |
|
191 | - * |
|
192 | - * @return ISearchRequest |
|
193 | - */ |
|
194 | - public function setMetaTags(array $tags): ISearchRequest; |
|
195 | - |
|
196 | - |
|
197 | - /** |
|
198 | - * Limit the search to a specific sub tag. |
|
199 | - * |
|
200 | - * @since 15.0.0 |
|
201 | - * |
|
202 | - * @param string $source |
|
203 | - * @param string $tag |
|
204 | - * |
|
205 | - * @return ISearchRequest |
|
206 | - */ |
|
207 | - public function addSubTag(string $source, string $tag): ISearchRequest; |
|
208 | - |
|
209 | - /** |
|
210 | - * Get the sub tags the search is limited to. |
|
211 | - * |
|
212 | - * @since 15.0.0 |
|
213 | - * |
|
214 | - * @param bool $formatted |
|
215 | - * |
|
216 | - * @return array |
|
217 | - */ |
|
218 | - public function getSubTags(bool $formatted): array; |
|
219 | - |
|
220 | - /** |
|
221 | - * Limit the search to an array of sub tags. |
|
222 | - * |
|
223 | - * @since 15.0.0 |
|
224 | - * |
|
225 | - * @param array $tags |
|
226 | - * |
|
227 | - * @return ISearchRequest |
|
228 | - */ |
|
229 | - public function setSubTags(array $tags): ISearchRequest; |
|
230 | - |
|
231 | - |
|
232 | - /** |
|
233 | - * Limit the search to a specific field of the mapping, using a full string. |
|
234 | - * |
|
235 | - * @since 15.0.0 |
|
236 | - * |
|
237 | - * @param string $field |
|
238 | - * |
|
239 | - * @return ISearchRequest |
|
240 | - */ |
|
241 | - public function addLimitField(string $field): ISearchRequest; |
|
242 | - |
|
243 | - /** |
|
244 | - * Get the fields the search is limited to. |
|
245 | - * |
|
246 | - * @since 15.0.0 |
|
247 | - * |
|
248 | - * @return array |
|
249 | - */ |
|
250 | - public function getLimitFields(): array; |
|
251 | - |
|
252 | - |
|
253 | - /** |
|
254 | - * Limit the search to a specific field of the mapping, using a wildcard on |
|
255 | - * the search string. |
|
256 | - * |
|
257 | - * @since 15.0.0 |
|
258 | - * |
|
259 | - * @param string $field |
|
260 | - * |
|
261 | - * @return ISearchRequest |
|
262 | - */ |
|
263 | - public function addWildcardField(string $field): ISearchRequest; |
|
264 | - |
|
265 | - /** |
|
266 | - * Get the limit to field of the mapping. |
|
267 | - * |
|
268 | - * @since 15.0.0 |
|
269 | - * |
|
270 | - * @return array |
|
271 | - */ |
|
272 | - public function getWildcardFields(): array; |
|
273 | - |
|
274 | - |
|
275 | - /** |
|
276 | - * Filter the results, based on a group of field, using regex |
|
277 | - * |
|
278 | - * @since 15.0.0 |
|
279 | - * |
|
280 | - * @param array $filters |
|
281 | - * |
|
282 | - * @return ISearchRequest |
|
283 | - */ |
|
284 | - public function addRegexFilters(array $filters): ISearchRequest; |
|
285 | - |
|
286 | - /** |
|
287 | - * Get the regex filters the search is limit to. |
|
288 | - * |
|
289 | - * @since 15.0.0 |
|
290 | - * |
|
291 | - * @return array |
|
292 | - */ |
|
293 | - public function getRegexFilters(): array; |
|
294 | - |
|
295 | - |
|
296 | - /** |
|
297 | - * Filter the results, based on a group of field, using wildcard |
|
298 | - * |
|
299 | - * @since 15.0.0 |
|
300 | - * |
|
301 | - * @param array $filter |
|
302 | - * |
|
303 | - * @return ISearchRequest |
|
304 | - */ |
|
305 | - public function addWildcardFilter(array $filter): ISearchRequest; |
|
306 | - |
|
307 | - /** |
|
308 | - * Get the wildcard filters the search is limit to. |
|
309 | - * |
|
310 | - * @since 15.0.0 |
|
311 | - * |
|
312 | - * @return array |
|
313 | - */ |
|
314 | - public function getWildcardFilters(): array; |
|
315 | - |
|
316 | - |
|
317 | - /** |
|
318 | - * Add an extra field to the search. |
|
319 | - * |
|
320 | - * @since 15.0.0 |
|
321 | - * |
|
322 | - * @param string $field |
|
323 | - * |
|
324 | - * @return ISearchRequest |
|
325 | - */ |
|
326 | - public function addField(string $field): ISearchRequest; |
|
327 | - |
|
328 | - /** |
|
329 | - * Get the list of extra field to search into. |
|
330 | - * |
|
331 | - * @since 15.0.0 |
|
332 | - * |
|
333 | - * @return array |
|
334 | - */ |
|
335 | - public function getFields(): array; |
|
336 | - |
|
337 | - |
|
338 | - |
|
339 | - /** |
|
340 | - * Add a MUST search on an extra field |
|
341 | - * |
|
342 | - * @param ISearchRequestSimpleQuery $query |
|
343 | - * |
|
344 | - * @return ISearchRequest |
|
345 | - * @since 17.0.0 |
|
346 | - */ |
|
347 | - public function addSimpleQuery(ISearchRequestSimpleQuery $query): ISearchRequest; |
|
348 | - |
|
349 | - |
|
350 | - /** |
|
351 | - * Get the list of queries on extra field. |
|
352 | - * |
|
353 | - * @return ISearchRequestSimpleQuery[] |
|
354 | - * @since 17.0.0 |
|
355 | - */ |
|
356 | - public function getSimpleQueries(): array; |
|
46 | + /** |
|
47 | + * Get the maximum number of results to be returns by the Search Platform. |
|
48 | + * |
|
49 | + * @since 15.0.0 |
|
50 | + * |
|
51 | + * @return int |
|
52 | + */ |
|
53 | + public function getSize(): int; |
|
54 | + |
|
55 | + |
|
56 | + /** |
|
57 | + * Get the current page. |
|
58 | + * Used by pagination. |
|
59 | + * |
|
60 | + * @since 15.0.0 |
|
61 | + * |
|
62 | + * @return int |
|
63 | + */ |
|
64 | + public function getPage(): int; |
|
65 | + |
|
66 | + |
|
67 | + /** |
|
68 | + * Get the author of the request. |
|
69 | + * |
|
70 | + * @since 15.0.0 |
|
71 | + * |
|
72 | + * @return string |
|
73 | + */ |
|
74 | + public function getAuthor(): string; |
|
75 | + |
|
76 | + /** |
|
77 | + * Get the searched string. |
|
78 | + * |
|
79 | + * @since 15.0.0 |
|
80 | + * |
|
81 | + * @return string |
|
82 | + */ |
|
83 | + public function getSearch(): string; |
|
84 | + |
|
85 | + /** |
|
86 | + * Set the searched string. |
|
87 | + * |
|
88 | + * @param string $search |
|
89 | + * |
|
90 | + * @since 17.0.0 |
|
91 | + * |
|
92 | + * @return ISearchRequest |
|
93 | + */ |
|
94 | + public function setSearch(string $search): ISearchRequest; |
|
95 | + |
|
96 | + /** |
|
97 | + * Extends the searched string. |
|
98 | + * |
|
99 | + * @since 17.0.0 |
|
100 | + * |
|
101 | + * @param string $search |
|
102 | + * |
|
103 | + * @return ISearchRequest |
|
104 | + */ |
|
105 | + public function addSearch(string $search): ISearchRequest; |
|
106 | + |
|
107 | + |
|
108 | + /** |
|
109 | + * Get the value of an option (as string). |
|
110 | + * |
|
111 | + * @since 15.0.0 |
|
112 | + * |
|
113 | + * @param string $option |
|
114 | + * @param string $default |
|
115 | + * |
|
116 | + * @return string |
|
117 | + */ |
|
118 | + public function getOption(string $option, string $default = ''): string; |
|
119 | + |
|
120 | + /** |
|
121 | + * Get the value of an option (as array). |
|
122 | + * |
|
123 | + * @since 15.0.0 |
|
124 | + * |
|
125 | + * @param string $option |
|
126 | + * @param array $default |
|
127 | + * |
|
128 | + * @return array |
|
129 | + */ |
|
130 | + public function getOptionArray(string $option, array $default = []): array; |
|
131 | + |
|
132 | + |
|
133 | + /** |
|
134 | + * Limit the search to a part of the document. |
|
135 | + * |
|
136 | + * @since 15.0.0 |
|
137 | + * |
|
138 | + * @param string $part |
|
139 | + * |
|
140 | + * @return ISearchRequest |
|
141 | + */ |
|
142 | + public function addPart(string $part): ISearchRequest; |
|
143 | + |
|
144 | + /** |
|
145 | + * Limit the search to an array of parts of the document. |
|
146 | + * |
|
147 | + * @since 15.0.0 |
|
148 | + * |
|
149 | + * @param array $parts |
|
150 | + * |
|
151 | + * @return ISearchRequest |
|
152 | + */ |
|
153 | + public function setParts(array $parts): ISearchRequest; |
|
154 | + |
|
155 | + /** |
|
156 | + * Get the parts the search is limited to. |
|
157 | + * |
|
158 | + * @since 15.0.0 |
|
159 | + * |
|
160 | + * @return array |
|
161 | + */ |
|
162 | + public function getParts(): array; |
|
163 | + |
|
164 | + |
|
165 | + /** |
|
166 | + * Limit the search to a specific meta tag. |
|
167 | + * |
|
168 | + * @since 15.0.0 |
|
169 | + * |
|
170 | + * @param string $tag |
|
171 | + * |
|
172 | + * @return ISearchRequest |
|
173 | + */ |
|
174 | + public function addMetaTag(string $tag): ISearchRequest; |
|
175 | + |
|
176 | + /** |
|
177 | + * Get the meta tags the search is limited to. |
|
178 | + * |
|
179 | + * @since 15.0.0 |
|
180 | + * |
|
181 | + * @return array |
|
182 | + */ |
|
183 | + public function getMetaTags(): array; |
|
184 | + |
|
185 | + /** |
|
186 | + * Limit the search to an array of meta tags. |
|
187 | + * |
|
188 | + * @since 15.0.0 |
|
189 | + * |
|
190 | + * @param array $tags |
|
191 | + * |
|
192 | + * @return ISearchRequest |
|
193 | + */ |
|
194 | + public function setMetaTags(array $tags): ISearchRequest; |
|
195 | + |
|
196 | + |
|
197 | + /** |
|
198 | + * Limit the search to a specific sub tag. |
|
199 | + * |
|
200 | + * @since 15.0.0 |
|
201 | + * |
|
202 | + * @param string $source |
|
203 | + * @param string $tag |
|
204 | + * |
|
205 | + * @return ISearchRequest |
|
206 | + */ |
|
207 | + public function addSubTag(string $source, string $tag): ISearchRequest; |
|
208 | + |
|
209 | + /** |
|
210 | + * Get the sub tags the search is limited to. |
|
211 | + * |
|
212 | + * @since 15.0.0 |
|
213 | + * |
|
214 | + * @param bool $formatted |
|
215 | + * |
|
216 | + * @return array |
|
217 | + */ |
|
218 | + public function getSubTags(bool $formatted): array; |
|
219 | + |
|
220 | + /** |
|
221 | + * Limit the search to an array of sub tags. |
|
222 | + * |
|
223 | + * @since 15.0.0 |
|
224 | + * |
|
225 | + * @param array $tags |
|
226 | + * |
|
227 | + * @return ISearchRequest |
|
228 | + */ |
|
229 | + public function setSubTags(array $tags): ISearchRequest; |
|
230 | + |
|
231 | + |
|
232 | + /** |
|
233 | + * Limit the search to a specific field of the mapping, using a full string. |
|
234 | + * |
|
235 | + * @since 15.0.0 |
|
236 | + * |
|
237 | + * @param string $field |
|
238 | + * |
|
239 | + * @return ISearchRequest |
|
240 | + */ |
|
241 | + public function addLimitField(string $field): ISearchRequest; |
|
242 | + |
|
243 | + /** |
|
244 | + * Get the fields the search is limited to. |
|
245 | + * |
|
246 | + * @since 15.0.0 |
|
247 | + * |
|
248 | + * @return array |
|
249 | + */ |
|
250 | + public function getLimitFields(): array; |
|
251 | + |
|
252 | + |
|
253 | + /** |
|
254 | + * Limit the search to a specific field of the mapping, using a wildcard on |
|
255 | + * the search string. |
|
256 | + * |
|
257 | + * @since 15.0.0 |
|
258 | + * |
|
259 | + * @param string $field |
|
260 | + * |
|
261 | + * @return ISearchRequest |
|
262 | + */ |
|
263 | + public function addWildcardField(string $field): ISearchRequest; |
|
264 | + |
|
265 | + /** |
|
266 | + * Get the limit to field of the mapping. |
|
267 | + * |
|
268 | + * @since 15.0.0 |
|
269 | + * |
|
270 | + * @return array |
|
271 | + */ |
|
272 | + public function getWildcardFields(): array; |
|
273 | + |
|
274 | + |
|
275 | + /** |
|
276 | + * Filter the results, based on a group of field, using regex |
|
277 | + * |
|
278 | + * @since 15.0.0 |
|
279 | + * |
|
280 | + * @param array $filters |
|
281 | + * |
|
282 | + * @return ISearchRequest |
|
283 | + */ |
|
284 | + public function addRegexFilters(array $filters): ISearchRequest; |
|
285 | + |
|
286 | + /** |
|
287 | + * Get the regex filters the search is limit to. |
|
288 | + * |
|
289 | + * @since 15.0.0 |
|
290 | + * |
|
291 | + * @return array |
|
292 | + */ |
|
293 | + public function getRegexFilters(): array; |
|
294 | + |
|
295 | + |
|
296 | + /** |
|
297 | + * Filter the results, based on a group of field, using wildcard |
|
298 | + * |
|
299 | + * @since 15.0.0 |
|
300 | + * |
|
301 | + * @param array $filter |
|
302 | + * |
|
303 | + * @return ISearchRequest |
|
304 | + */ |
|
305 | + public function addWildcardFilter(array $filter): ISearchRequest; |
|
306 | + |
|
307 | + /** |
|
308 | + * Get the wildcard filters the search is limit to. |
|
309 | + * |
|
310 | + * @since 15.0.0 |
|
311 | + * |
|
312 | + * @return array |
|
313 | + */ |
|
314 | + public function getWildcardFilters(): array; |
|
315 | + |
|
316 | + |
|
317 | + /** |
|
318 | + * Add an extra field to the search. |
|
319 | + * |
|
320 | + * @since 15.0.0 |
|
321 | + * |
|
322 | + * @param string $field |
|
323 | + * |
|
324 | + * @return ISearchRequest |
|
325 | + */ |
|
326 | + public function addField(string $field): ISearchRequest; |
|
327 | + |
|
328 | + /** |
|
329 | + * Get the list of extra field to search into. |
|
330 | + * |
|
331 | + * @since 15.0.0 |
|
332 | + * |
|
333 | + * @return array |
|
334 | + */ |
|
335 | + public function getFields(): array; |
|
336 | + |
|
337 | + |
|
338 | + |
|
339 | + /** |
|
340 | + * Add a MUST search on an extra field |
|
341 | + * |
|
342 | + * @param ISearchRequestSimpleQuery $query |
|
343 | + * |
|
344 | + * @return ISearchRequest |
|
345 | + * @since 17.0.0 |
|
346 | + */ |
|
347 | + public function addSimpleQuery(ISearchRequestSimpleQuery $query): ISearchRequest; |
|
348 | + |
|
349 | + |
|
350 | + /** |
|
351 | + * Get the list of queries on extra field. |
|
352 | + * |
|
353 | + * @return ISearchRequestSimpleQuery[] |
|
354 | + * @since 17.0.0 |
|
355 | + */ |
|
356 | + public function getSimpleQueries(): array; |
|
357 | 357 | } |
@@ -46,141 +46,141 @@ |
||
46 | 46 | * |
47 | 47 | */ |
48 | 48 | interface ISearchResult { |
49 | - /** |
|
50 | - * Get the original SearchRequest. |
|
51 | - * |
|
52 | - * @see ISearchRequest |
|
53 | - * |
|
54 | - * @since 15.0.0 |
|
55 | - * |
|
56 | - * @return ISearchRequest |
|
57 | - */ |
|
58 | - public function getRequest(): ISearchRequest; |
|
59 | - |
|
60 | - /** |
|
61 | - * Get the targeted Content Provider. |
|
62 | - * |
|
63 | - * @since 15.0.0 |
|
64 | - * |
|
65 | - * @return IFullTextSearchProvider |
|
66 | - */ |
|
67 | - public function getProvider(): IFullTextSearchProvider; |
|
68 | - |
|
69 | - |
|
70 | - /** |
|
71 | - * Add an IIndexDocument as one of the result of the search request. |
|
72 | - * |
|
73 | - * @since 15.0.0 |
|
74 | - * |
|
75 | - * @param IIndexDocument $document |
|
76 | - * |
|
77 | - * @return ISearchResult |
|
78 | - */ |
|
79 | - public function addDocument(IIndexDocument $document): ISearchResult; |
|
80 | - |
|
81 | - /** |
|
82 | - * Returns all result of the search request, in an array of IIndexDocument. |
|
83 | - * |
|
84 | - * @since 15.0.0 |
|
85 | - * |
|
86 | - * @return IIndexDocument[] |
|
87 | - */ |
|
88 | - public function getDocuments(): array; |
|
89 | - |
|
90 | - /** |
|
91 | - * Set an array of IIndexDocument as the result of the search request. |
|
92 | - * |
|
93 | - * @since 15.0.0 |
|
94 | - * |
|
95 | - * @param IIndexDocument[] $documents |
|
96 | - * |
|
97 | - * @return ISearchResult |
|
98 | - */ |
|
99 | - public function setDocuments(array $documents): ISearchResult; |
|
100 | - |
|
101 | - |
|
102 | - /** |
|
103 | - * Add an aggregation to the result. |
|
104 | - * |
|
105 | - * @since 15.0.0 |
|
106 | - * |
|
107 | - * @param string $category |
|
108 | - * @param string $value |
|
109 | - * @param int $count |
|
110 | - * |
|
111 | - * @return ISearchResult |
|
112 | - */ |
|
113 | - public function addAggregation(string $category, string $value, int $count): ISearchResult; |
|
114 | - |
|
115 | - /** |
|
116 | - * Get all aggregations. |
|
117 | - * |
|
118 | - * @since 15.0.0 |
|
119 | - * |
|
120 | - * @param string $category |
|
121 | - * |
|
122 | - * @return array |
|
123 | - */ |
|
124 | - public function getAggregations(string $category): array; |
|
125 | - |
|
126 | - |
|
127 | - /** |
|
128 | - * Set the raw result of the request. |
|
129 | - * |
|
130 | - * @since 15.0.0 |
|
131 | - * |
|
132 | - * @param string $result |
|
133 | - * |
|
134 | - * @return ISearchResult |
|
135 | - */ |
|
136 | - public function setRawResult(string $result): ISearchResult; |
|
137 | - |
|
138 | - |
|
139 | - /** |
|
140 | - * Set the total number of results for the search request. |
|
141 | - * Used by pagination. |
|
142 | - * |
|
143 | - * @since 15.0.0 |
|
144 | - * |
|
145 | - * @param int $total |
|
146 | - * |
|
147 | - * @return ISearchResult |
|
148 | - */ |
|
149 | - public function setTotal(int $total): ISearchResult; |
|
150 | - |
|
151 | - |
|
152 | - /** |
|
153 | - * Set the top score for the search request. |
|
154 | - * |
|
155 | - * @since 15.0.0 |
|
156 | - * |
|
157 | - * @param int $score |
|
158 | - * |
|
159 | - * @return ISearchResult |
|
160 | - */ |
|
161 | - public function setMaxScore(int $score): ISearchResult; |
|
162 | - |
|
163 | - |
|
164 | - /** |
|
165 | - * Set the time spent by the request to perform the search. |
|
166 | - * |
|
167 | - * @since 15.0.0 |
|
168 | - * |
|
169 | - * @param int $time |
|
170 | - * |
|
171 | - * @return ISearchResult |
|
172 | - */ |
|
173 | - public function setTime(int $time): ISearchResult; |
|
174 | - |
|
175 | - |
|
176 | - /** |
|
177 | - * Set to true if the request timed out. |
|
178 | - * |
|
179 | - * @since 15.0.0 |
|
180 | - * |
|
181 | - * @param bool $timedOut |
|
182 | - * |
|
183 | - * @return ISearchResult |
|
184 | - */ |
|
185 | - public function setTimedOut(bool $timedOut): ISearchResult; |
|
49 | + /** |
|
50 | + * Get the original SearchRequest. |
|
51 | + * |
|
52 | + * @see ISearchRequest |
|
53 | + * |
|
54 | + * @since 15.0.0 |
|
55 | + * |
|
56 | + * @return ISearchRequest |
|
57 | + */ |
|
58 | + public function getRequest(): ISearchRequest; |
|
59 | + |
|
60 | + /** |
|
61 | + * Get the targeted Content Provider. |
|
62 | + * |
|
63 | + * @since 15.0.0 |
|
64 | + * |
|
65 | + * @return IFullTextSearchProvider |
|
66 | + */ |
|
67 | + public function getProvider(): IFullTextSearchProvider; |
|
68 | + |
|
69 | + |
|
70 | + /** |
|
71 | + * Add an IIndexDocument as one of the result of the search request. |
|
72 | + * |
|
73 | + * @since 15.0.0 |
|
74 | + * |
|
75 | + * @param IIndexDocument $document |
|
76 | + * |
|
77 | + * @return ISearchResult |
|
78 | + */ |
|
79 | + public function addDocument(IIndexDocument $document): ISearchResult; |
|
80 | + |
|
81 | + /** |
|
82 | + * Returns all result of the search request, in an array of IIndexDocument. |
|
83 | + * |
|
84 | + * @since 15.0.0 |
|
85 | + * |
|
86 | + * @return IIndexDocument[] |
|
87 | + */ |
|
88 | + public function getDocuments(): array; |
|
89 | + |
|
90 | + /** |
|
91 | + * Set an array of IIndexDocument as the result of the search request. |
|
92 | + * |
|
93 | + * @since 15.0.0 |
|
94 | + * |
|
95 | + * @param IIndexDocument[] $documents |
|
96 | + * |
|
97 | + * @return ISearchResult |
|
98 | + */ |
|
99 | + public function setDocuments(array $documents): ISearchResult; |
|
100 | + |
|
101 | + |
|
102 | + /** |
|
103 | + * Add an aggregation to the result. |
|
104 | + * |
|
105 | + * @since 15.0.0 |
|
106 | + * |
|
107 | + * @param string $category |
|
108 | + * @param string $value |
|
109 | + * @param int $count |
|
110 | + * |
|
111 | + * @return ISearchResult |
|
112 | + */ |
|
113 | + public function addAggregation(string $category, string $value, int $count): ISearchResult; |
|
114 | + |
|
115 | + /** |
|
116 | + * Get all aggregations. |
|
117 | + * |
|
118 | + * @since 15.0.0 |
|
119 | + * |
|
120 | + * @param string $category |
|
121 | + * |
|
122 | + * @return array |
|
123 | + */ |
|
124 | + public function getAggregations(string $category): array; |
|
125 | + |
|
126 | + |
|
127 | + /** |
|
128 | + * Set the raw result of the request. |
|
129 | + * |
|
130 | + * @since 15.0.0 |
|
131 | + * |
|
132 | + * @param string $result |
|
133 | + * |
|
134 | + * @return ISearchResult |
|
135 | + */ |
|
136 | + public function setRawResult(string $result): ISearchResult; |
|
137 | + |
|
138 | + |
|
139 | + /** |
|
140 | + * Set the total number of results for the search request. |
|
141 | + * Used by pagination. |
|
142 | + * |
|
143 | + * @since 15.0.0 |
|
144 | + * |
|
145 | + * @param int $total |
|
146 | + * |
|
147 | + * @return ISearchResult |
|
148 | + */ |
|
149 | + public function setTotal(int $total): ISearchResult; |
|
150 | + |
|
151 | + |
|
152 | + /** |
|
153 | + * Set the top score for the search request. |
|
154 | + * |
|
155 | + * @since 15.0.0 |
|
156 | + * |
|
157 | + * @param int $score |
|
158 | + * |
|
159 | + * @return ISearchResult |
|
160 | + */ |
|
161 | + public function setMaxScore(int $score): ISearchResult; |
|
162 | + |
|
163 | + |
|
164 | + /** |
|
165 | + * Set the time spent by the request to perform the search. |
|
166 | + * |
|
167 | + * @since 15.0.0 |
|
168 | + * |
|
169 | + * @param int $time |
|
170 | + * |
|
171 | + * @return ISearchResult |
|
172 | + */ |
|
173 | + public function setTime(int $time): ISearchResult; |
|
174 | + |
|
175 | + |
|
176 | + /** |
|
177 | + * Set to true if the request timed out. |
|
178 | + * |
|
179 | + * @since 15.0.0 |
|
180 | + * |
|
181 | + * @param bool $timedOut |
|
182 | + * |
|
183 | + * @return ISearchResult |
|
184 | + */ |
|
185 | + public function setTimedOut(bool $timedOut): ISearchResult; |
|
186 | 186 | } |
@@ -52,116 +52,116 @@ |
||
52 | 52 | * |
53 | 53 | */ |
54 | 54 | interface ISearchTemplate { |
55 | - /** |
|
56 | - * Set the class of the icon to be displayed in the left panel of the |
|
57 | - * FullTextSearch navigation page, in front of the related Content Provider. |
|
58 | - * |
|
59 | - * @since 16.0.0 |
|
60 | - * |
|
61 | - * @param string $class |
|
62 | - * |
|
63 | - * @return ISearchTemplate |
|
64 | - */ |
|
65 | - public function setIcon(string $class): ISearchTemplate; |
|
66 | - |
|
67 | - /** |
|
68 | - * Get the class of the icon. |
|
69 | - * |
|
70 | - * @since 16.0.0 |
|
71 | - * |
|
72 | - * @return string |
|
73 | - */ |
|
74 | - public function getIcon(): string; |
|
75 | - |
|
76 | - |
|
77 | - /** |
|
78 | - * Set the path of a CSS file that will be loaded when needed. |
|
79 | - * |
|
80 | - * @since 16.0.0 |
|
81 | - * |
|
82 | - * @param string $css |
|
83 | - * |
|
84 | - * @return ISearchTemplate |
|
85 | - */ |
|
86 | - public function setCss(string $css): ISearchTemplate; |
|
87 | - |
|
88 | - /** |
|
89 | - * Get the path of the CSS file. |
|
90 | - * |
|
91 | - * @since 16.0.0 |
|
92 | - * |
|
93 | - * @return string |
|
94 | - */ |
|
95 | - public function getCss(): string; |
|
96 | - |
|
97 | - |
|
98 | - /** |
|
99 | - * Set the path of the file of a template that the HTML will be displayed |
|
100 | - * below the Options. |
|
101 | - * This should only be used if your Content Provider needs to set options in |
|
102 | - * a way not generated by FullTextSearch |
|
103 | - * |
|
104 | - * @since 16.0.0 |
|
105 | - * |
|
106 | - * @param string $template |
|
107 | - * |
|
108 | - * @return ISearchTemplate |
|
109 | - */ |
|
110 | - public function setTemplate(string $template): ISearchTemplate; |
|
111 | - |
|
112 | - /** |
|
113 | - * Get the path of the template file. |
|
114 | - * |
|
115 | - * @since 16.0.0 |
|
116 | - * |
|
117 | - * @return string |
|
118 | - */ |
|
119 | - public function getTemplate(): string; |
|
120 | - |
|
121 | - |
|
122 | - /** |
|
123 | - * Add an option in the Panel that is displayed when the user start a search |
|
124 | - * within the app that generate the content. |
|
125 | - * |
|
126 | - * @see ISearchOption |
|
127 | - * |
|
128 | - * @since 16.0.0 |
|
129 | - * |
|
130 | - * @param ISearchOption $option |
|
131 | - * |
|
132 | - * @return ISearchTemplate |
|
133 | - */ |
|
134 | - public function addPanelOption(ISearchOption $option): ISearchTemplate; |
|
135 | - |
|
136 | - /** |
|
137 | - * Get all options to be displayed in the Panel. |
|
138 | - * |
|
139 | - * @since 16.0.0 |
|
140 | - * |
|
141 | - * @return ISearchOption[] |
|
142 | - */ |
|
143 | - public function getPanelOptions(): array; |
|
144 | - |
|
145 | - |
|
146 | - /** |
|
147 | - * Add an option in the left panel of the FullTextSearch navigation page. |
|
148 | - * |
|
149 | - * @see ISearchOption |
|
150 | - * |
|
151 | - * @since 16.0.0 |
|
152 | - * |
|
153 | - * @param ISearchOption $option |
|
154 | - * |
|
155 | - * @return ISearchTemplate |
|
156 | - */ |
|
157 | - public function addNavigationOption(ISearchOption $option): ISearchTemplate; |
|
158 | - |
|
159 | - /** |
|
160 | - * Get all options to be displayed in the FullTextSearch navigation page. |
|
161 | - * |
|
162 | - * @since 16.0.0 |
|
163 | - * |
|
164 | - * @return array |
|
165 | - */ |
|
166 | - public function getNavigationOptions(): array; |
|
55 | + /** |
|
56 | + * Set the class of the icon to be displayed in the left panel of the |
|
57 | + * FullTextSearch navigation page, in front of the related Content Provider. |
|
58 | + * |
|
59 | + * @since 16.0.0 |
|
60 | + * |
|
61 | + * @param string $class |
|
62 | + * |
|
63 | + * @return ISearchTemplate |
|
64 | + */ |
|
65 | + public function setIcon(string $class): ISearchTemplate; |
|
66 | + |
|
67 | + /** |
|
68 | + * Get the class of the icon. |
|
69 | + * |
|
70 | + * @since 16.0.0 |
|
71 | + * |
|
72 | + * @return string |
|
73 | + */ |
|
74 | + public function getIcon(): string; |
|
75 | + |
|
76 | + |
|
77 | + /** |
|
78 | + * Set the path of a CSS file that will be loaded when needed. |
|
79 | + * |
|
80 | + * @since 16.0.0 |
|
81 | + * |
|
82 | + * @param string $css |
|
83 | + * |
|
84 | + * @return ISearchTemplate |
|
85 | + */ |
|
86 | + public function setCss(string $css): ISearchTemplate; |
|
87 | + |
|
88 | + /** |
|
89 | + * Get the path of the CSS file. |
|
90 | + * |
|
91 | + * @since 16.0.0 |
|
92 | + * |
|
93 | + * @return string |
|
94 | + */ |
|
95 | + public function getCss(): string; |
|
96 | + |
|
97 | + |
|
98 | + /** |
|
99 | + * Set the path of the file of a template that the HTML will be displayed |
|
100 | + * below the Options. |
|
101 | + * This should only be used if your Content Provider needs to set options in |
|
102 | + * a way not generated by FullTextSearch |
|
103 | + * |
|
104 | + * @since 16.0.0 |
|
105 | + * |
|
106 | + * @param string $template |
|
107 | + * |
|
108 | + * @return ISearchTemplate |
|
109 | + */ |
|
110 | + public function setTemplate(string $template): ISearchTemplate; |
|
111 | + |
|
112 | + /** |
|
113 | + * Get the path of the template file. |
|
114 | + * |
|
115 | + * @since 16.0.0 |
|
116 | + * |
|
117 | + * @return string |
|
118 | + */ |
|
119 | + public function getTemplate(): string; |
|
120 | + |
|
121 | + |
|
122 | + /** |
|
123 | + * Add an option in the Panel that is displayed when the user start a search |
|
124 | + * within the app that generate the content. |
|
125 | + * |
|
126 | + * @see ISearchOption |
|
127 | + * |
|
128 | + * @since 16.0.0 |
|
129 | + * |
|
130 | + * @param ISearchOption $option |
|
131 | + * |
|
132 | + * @return ISearchTemplate |
|
133 | + */ |
|
134 | + public function addPanelOption(ISearchOption $option): ISearchTemplate; |
|
135 | + |
|
136 | + /** |
|
137 | + * Get all options to be displayed in the Panel. |
|
138 | + * |
|
139 | + * @since 16.0.0 |
|
140 | + * |
|
141 | + * @return ISearchOption[] |
|
142 | + */ |
|
143 | + public function getPanelOptions(): array; |
|
144 | + |
|
145 | + |
|
146 | + /** |
|
147 | + * Add an option in the left panel of the FullTextSearch navigation page. |
|
148 | + * |
|
149 | + * @see ISearchOption |
|
150 | + * |
|
151 | + * @since 16.0.0 |
|
152 | + * |
|
153 | + * @param ISearchOption $option |
|
154 | + * |
|
155 | + * @return ISearchTemplate |
|
156 | + */ |
|
157 | + public function addNavigationOption(ISearchOption $option): ISearchTemplate; |
|
158 | + |
|
159 | + /** |
|
160 | + * Get all options to be displayed in the FullTextSearch navigation page. |
|
161 | + * |
|
162 | + * @since 16.0.0 |
|
163 | + * |
|
164 | + * @return array |
|
165 | + */ |
|
166 | + public function getNavigationOptions(): array; |
|
167 | 167 | } |
@@ -45,209 +45,209 @@ |
||
45 | 45 | * |
46 | 46 | */ |
47 | 47 | interface IDocumentAccess { |
48 | - /** |
|
49 | - * Owner of the document can be set at the init of the object. |
|
50 | - * |
|
51 | - * @since 16.0.0 |
|
52 | - * |
|
53 | - * IDocumentAccess constructor. |
|
54 | - * |
|
55 | - * @param string $ownerId |
|
56 | - */ |
|
57 | - public function __construct(string $ownerId = ''); |
|
58 | - |
|
59 | - |
|
60 | - /** |
|
61 | - * Set the Owner of the document. |
|
62 | - * |
|
63 | - * @since 16.0.0 |
|
64 | - * |
|
65 | - * @param string $ownerId |
|
66 | - * |
|
67 | - * @return IDocumentAccess |
|
68 | - */ |
|
69 | - public function setOwnerId(string $ownerId): IDocumentAccess; |
|
70 | - |
|
71 | - /** |
|
72 | - * Get the Owner of the document. |
|
73 | - * |
|
74 | - * @since 16.0.0 |
|
75 | - * |
|
76 | - * @return string |
|
77 | - */ |
|
78 | - public function getOwnerId(): string; |
|
79 | - |
|
80 | - |
|
81 | - /** |
|
82 | - * Set the viewer of the document. |
|
83 | - * |
|
84 | - * @since 16.0.0 |
|
85 | - * |
|
86 | - * @param string $viewerId |
|
87 | - * |
|
88 | - * @return IDocumentAccess |
|
89 | - */ |
|
90 | - public function setViewerId(string $viewerId): IDocumentAccess; |
|
91 | - |
|
92 | - /** |
|
93 | - * Get the viewer of the document. |
|
94 | - * |
|
95 | - * @since 16.0.0 |
|
96 | - * |
|
97 | - * @return string |
|
98 | - */ |
|
99 | - public function getViewerId(): string; |
|
100 | - |
|
101 | - |
|
102 | - /** |
|
103 | - * Set the list of users that have read access to the document. |
|
104 | - * |
|
105 | - * @since 16.0.0 |
|
106 | - * |
|
107 | - * @param array $users |
|
108 | - * |
|
109 | - * @return IDocumentAccess |
|
110 | - */ |
|
111 | - public function setUsers(array $users): IDocumentAccess; |
|
112 | - |
|
113 | - /** |
|
114 | - * Add an entry to the list of users that have read access to the document. |
|
115 | - * |
|
116 | - * @since 16.0.0 |
|
117 | - * |
|
118 | - * @param string $user |
|
119 | - * |
|
120 | - * @return IDocumentAccess |
|
121 | - */ |
|
122 | - public function addUser(string $user): IDocumentAccess; |
|
123 | - |
|
124 | - /** |
|
125 | - * Add multiple entries to the list of users that have read access to the |
|
126 | - * document. |
|
127 | - * |
|
128 | - * @since 16.0.0 |
|
129 | - * |
|
130 | - * @param array $users |
|
131 | - * |
|
132 | - * @return IDocumentAccess |
|
133 | - */ |
|
134 | - public function addUsers($users): IDocumentAccess; |
|
135 | - |
|
136 | - /** |
|
137 | - * Get the complete list of users that have read access to the document. |
|
138 | - * |
|
139 | - * @since 16.0.0 |
|
140 | - * |
|
141 | - * @return array |
|
142 | - */ |
|
143 | - public function getUsers(): array; |
|
144 | - |
|
145 | - |
|
146 | - /** |
|
147 | - * Set the list of groups that have read access to the document. |
|
148 | - * |
|
149 | - * @since 16.0.0 |
|
150 | - * |
|
151 | - * @param array $groups |
|
152 | - * |
|
153 | - * @return IDocumentAccess |
|
154 | - */ |
|
155 | - public function setGroups(array $groups): IDocumentAccess; |
|
156 | - |
|
157 | - /** |
|
158 | - * Add an entry to the list of groups that have read access to the document. |
|
159 | - * |
|
160 | - * @since 16.0.0 |
|
161 | - * |
|
162 | - * @param string $group |
|
163 | - * |
|
164 | - * @return IDocumentAccess |
|
165 | - */ |
|
166 | - public function addGroup(string $group): IDocumentAccess; |
|
167 | - |
|
168 | - /** |
|
169 | - * Add multiple entries to the list of groups that have read access to the |
|
170 | - * document. |
|
171 | - * |
|
172 | - * @since 16.0.0 |
|
173 | - * |
|
174 | - * @param array $groups |
|
175 | - * |
|
176 | - * @return IDocumentAccess |
|
177 | - */ |
|
178 | - public function addGroups(array $groups); |
|
179 | - |
|
180 | - /** |
|
181 | - * Get the complete list of groups that have read access to the document. |
|
182 | - * |
|
183 | - * @since 16.0.0 |
|
184 | - * |
|
185 | - * @return array |
|
186 | - */ |
|
187 | - public function getGroups(): array; |
|
188 | - |
|
189 | - |
|
190 | - /** |
|
191 | - * Set the list of circles that have read access to the document. |
|
192 | - * |
|
193 | - * @since 16.0.0 |
|
194 | - * |
|
195 | - * @param array $circles |
|
196 | - * |
|
197 | - * @return IDocumentAccess |
|
198 | - */ |
|
199 | - public function setCircles(array $circles): IDocumentAccess; |
|
200 | - |
|
201 | - /** |
|
202 | - * Add an entry to the list of circles that have read access to the document. |
|
203 | - * |
|
204 | - * @since 16.0.0 |
|
205 | - * |
|
206 | - * @param string $circle |
|
207 | - * |
|
208 | - * @return IDocumentAccess |
|
209 | - */ |
|
210 | - public function addCircle(string $circle): IDocumentAccess; |
|
211 | - |
|
212 | - /** |
|
213 | - * Add multiple entries to the list of groups that have read access to the |
|
214 | - * document. |
|
215 | - * |
|
216 | - * @since 16.0.0 |
|
217 | - * |
|
218 | - * @param array $circles |
|
219 | - * |
|
220 | - * @return IDocumentAccess |
|
221 | - */ |
|
222 | - public function addCircles(array $circles): IDocumentAccess; |
|
223 | - |
|
224 | - /** |
|
225 | - * Get the complete list of circles that have read access to the document. |
|
226 | - * |
|
227 | - * @since 16.0.0 |
|
228 | - * |
|
229 | - * @return array |
|
230 | - */ |
|
231 | - public function getCircles(): array; |
|
232 | - |
|
233 | - |
|
234 | - /** |
|
235 | - * Set the list of links that have read access to the document. |
|
236 | - * |
|
237 | - * @since 16.0.0 |
|
238 | - * |
|
239 | - * @param array $links |
|
240 | - * |
|
241 | - * @return IDocumentAccess |
|
242 | - */ |
|
243 | - public function setLinks(array $links): IDocumentAccess; |
|
244 | - |
|
245 | - /** |
|
246 | - * Get the list of links that have read access to the document. |
|
247 | - * |
|
248 | - * @since 16.0.0 |
|
249 | - * |
|
250 | - * @return array |
|
251 | - */ |
|
252 | - public function getLinks(): array; |
|
48 | + /** |
|
49 | + * Owner of the document can be set at the init of the object. |
|
50 | + * |
|
51 | + * @since 16.0.0 |
|
52 | + * |
|
53 | + * IDocumentAccess constructor. |
|
54 | + * |
|
55 | + * @param string $ownerId |
|
56 | + */ |
|
57 | + public function __construct(string $ownerId = ''); |
|
58 | + |
|
59 | + |
|
60 | + /** |
|
61 | + * Set the Owner of the document. |
|
62 | + * |
|
63 | + * @since 16.0.0 |
|
64 | + * |
|
65 | + * @param string $ownerId |
|
66 | + * |
|
67 | + * @return IDocumentAccess |
|
68 | + */ |
|
69 | + public function setOwnerId(string $ownerId): IDocumentAccess; |
|
70 | + |
|
71 | + /** |
|
72 | + * Get the Owner of the document. |
|
73 | + * |
|
74 | + * @since 16.0.0 |
|
75 | + * |
|
76 | + * @return string |
|
77 | + */ |
|
78 | + public function getOwnerId(): string; |
|
79 | + |
|
80 | + |
|
81 | + /** |
|
82 | + * Set the viewer of the document. |
|
83 | + * |
|
84 | + * @since 16.0.0 |
|
85 | + * |
|
86 | + * @param string $viewerId |
|
87 | + * |
|
88 | + * @return IDocumentAccess |
|
89 | + */ |
|
90 | + public function setViewerId(string $viewerId): IDocumentAccess; |
|
91 | + |
|
92 | + /** |
|
93 | + * Get the viewer of the document. |
|
94 | + * |
|
95 | + * @since 16.0.0 |
|
96 | + * |
|
97 | + * @return string |
|
98 | + */ |
|
99 | + public function getViewerId(): string; |
|
100 | + |
|
101 | + |
|
102 | + /** |
|
103 | + * Set the list of users that have read access to the document. |
|
104 | + * |
|
105 | + * @since 16.0.0 |
|
106 | + * |
|
107 | + * @param array $users |
|
108 | + * |
|
109 | + * @return IDocumentAccess |
|
110 | + */ |
|
111 | + public function setUsers(array $users): IDocumentAccess; |
|
112 | + |
|
113 | + /** |
|
114 | + * Add an entry to the list of users that have read access to the document. |
|
115 | + * |
|
116 | + * @since 16.0.0 |
|
117 | + * |
|
118 | + * @param string $user |
|
119 | + * |
|
120 | + * @return IDocumentAccess |
|
121 | + */ |
|
122 | + public function addUser(string $user): IDocumentAccess; |
|
123 | + |
|
124 | + /** |
|
125 | + * Add multiple entries to the list of users that have read access to the |
|
126 | + * document. |
|
127 | + * |
|
128 | + * @since 16.0.0 |
|
129 | + * |
|
130 | + * @param array $users |
|
131 | + * |
|
132 | + * @return IDocumentAccess |
|
133 | + */ |
|
134 | + public function addUsers($users): IDocumentAccess; |
|
135 | + |
|
136 | + /** |
|
137 | + * Get the complete list of users that have read access to the document. |
|
138 | + * |
|
139 | + * @since 16.0.0 |
|
140 | + * |
|
141 | + * @return array |
|
142 | + */ |
|
143 | + public function getUsers(): array; |
|
144 | + |
|
145 | + |
|
146 | + /** |
|
147 | + * Set the list of groups that have read access to the document. |
|
148 | + * |
|
149 | + * @since 16.0.0 |
|
150 | + * |
|
151 | + * @param array $groups |
|
152 | + * |
|
153 | + * @return IDocumentAccess |
|
154 | + */ |
|
155 | + public function setGroups(array $groups): IDocumentAccess; |
|
156 | + |
|
157 | + /** |
|
158 | + * Add an entry to the list of groups that have read access to the document. |
|
159 | + * |
|
160 | + * @since 16.0.0 |
|
161 | + * |
|
162 | + * @param string $group |
|
163 | + * |
|
164 | + * @return IDocumentAccess |
|
165 | + */ |
|
166 | + public function addGroup(string $group): IDocumentAccess; |
|
167 | + |
|
168 | + /** |
|
169 | + * Add multiple entries to the list of groups that have read access to the |
|
170 | + * document. |
|
171 | + * |
|
172 | + * @since 16.0.0 |
|
173 | + * |
|
174 | + * @param array $groups |
|
175 | + * |
|
176 | + * @return IDocumentAccess |
|
177 | + */ |
|
178 | + public function addGroups(array $groups); |
|
179 | + |
|
180 | + /** |
|
181 | + * Get the complete list of groups that have read access to the document. |
|
182 | + * |
|
183 | + * @since 16.0.0 |
|
184 | + * |
|
185 | + * @return array |
|
186 | + */ |
|
187 | + public function getGroups(): array; |
|
188 | + |
|
189 | + |
|
190 | + /** |
|
191 | + * Set the list of circles that have read access to the document. |
|
192 | + * |
|
193 | + * @since 16.0.0 |
|
194 | + * |
|
195 | + * @param array $circles |
|
196 | + * |
|
197 | + * @return IDocumentAccess |
|
198 | + */ |
|
199 | + public function setCircles(array $circles): IDocumentAccess; |
|
200 | + |
|
201 | + /** |
|
202 | + * Add an entry to the list of circles that have read access to the document. |
|
203 | + * |
|
204 | + * @since 16.0.0 |
|
205 | + * |
|
206 | + * @param string $circle |
|
207 | + * |
|
208 | + * @return IDocumentAccess |
|
209 | + */ |
|
210 | + public function addCircle(string $circle): IDocumentAccess; |
|
211 | + |
|
212 | + /** |
|
213 | + * Add multiple entries to the list of groups that have read access to the |
|
214 | + * document. |
|
215 | + * |
|
216 | + * @since 16.0.0 |
|
217 | + * |
|
218 | + * @param array $circles |
|
219 | + * |
|
220 | + * @return IDocumentAccess |
|
221 | + */ |
|
222 | + public function addCircles(array $circles): IDocumentAccess; |
|
223 | + |
|
224 | + /** |
|
225 | + * Get the complete list of circles that have read access to the document. |
|
226 | + * |
|
227 | + * @since 16.0.0 |
|
228 | + * |
|
229 | + * @return array |
|
230 | + */ |
|
231 | + public function getCircles(): array; |
|
232 | + |
|
233 | + |
|
234 | + /** |
|
235 | + * Set the list of links that have read access to the document. |
|
236 | + * |
|
237 | + * @since 16.0.0 |
|
238 | + * |
|
239 | + * @param array $links |
|
240 | + * |
|
241 | + * @return IDocumentAccess |
|
242 | + */ |
|
243 | + public function setLinks(array $links): IDocumentAccess; |
|
244 | + |
|
245 | + /** |
|
246 | + * Get the list of links that have read access to the document. |
|
247 | + * |
|
248 | + * @since 16.0.0 |
|
249 | + * |
|
250 | + * @return array |
|
251 | + */ |
|
252 | + public function getLinks(): array; |
|
253 | 253 | } |
@@ -70,145 +70,145 @@ |
||
70 | 70 | * |
71 | 71 | */ |
72 | 72 | interface IFullTextSearchPlatform { |
73 | - /** |
|
74 | - * Must returns a unique Id used to identify the Search Platform. |
|
75 | - * Id must contains only alphanumeric chars, with no space. |
|
76 | - * |
|
77 | - * @since 15.0.0 |
|
78 | - * |
|
79 | - * @return string |
|
80 | - */ |
|
81 | - public function getId(): string; |
|
82 | - |
|
83 | - |
|
84 | - /** |
|
85 | - * Must returns a descriptive name of the Search Platform. |
|
86 | - * This is used mainly in the admin settings page to display the list of |
|
87 | - * available Search Platform |
|
88 | - * |
|
89 | - * @since 15.0.0 |
|
90 | - * |
|
91 | - * @return string |
|
92 | - */ |
|
93 | - public function getName(): string; |
|
94 | - |
|
95 | - |
|
96 | - /** |
|
97 | - * should returns the current configuration of the Search Platform. |
|
98 | - * This is used to display the configuration when using the |
|
99 | - * ./occ fulltextsearch:check command line. |
|
100 | - * |
|
101 | - * @since 15.0.0 |
|
102 | - * |
|
103 | - * @return array |
|
104 | - */ |
|
105 | - public function getConfiguration(): array; |
|
106 | - |
|
107 | - |
|
108 | - /** |
|
109 | - * Set the wrapper of the currently executed process. |
|
110 | - * Because the index process can be long and heavy, and because errors can |
|
111 | - * be encountered during the process, the IRunner is a wrapper that allow the |
|
112 | - * Search Platform to communicate with the process initiated by |
|
113 | - * FullTextSearch. |
|
114 | - * |
|
115 | - * The IRunner is coming with some methods so the Search Platform can |
|
116 | - * returns important information and errors to be displayed to the admin. |
|
117 | - * |
|
118 | - * @since 15.0.0 |
|
119 | - * |
|
120 | - * @param IRunner $runner |
|
121 | - */ |
|
122 | - public function setRunner(IRunner $runner); |
|
123 | - |
|
124 | - |
|
125 | - /** |
|
126 | - * Called when FullTextSearch is loading your Search Platform. |
|
127 | - * |
|
128 | - * @since 15.0.0 |
|
129 | - */ |
|
130 | - public function loadPlatform(); |
|
131 | - |
|
132 | - |
|
133 | - /** |
|
134 | - * Called to check that your Search Platform is correctly configured and that |
|
135 | - * This is also the right place to check that the Search Service is available. |
|
136 | - * |
|
137 | - * @since 15.0.0 |
|
138 | - * |
|
139 | - * @return bool |
|
140 | - */ |
|
141 | - public function testPlatform(): bool; |
|
142 | - |
|
143 | - |
|
144 | - /** |
|
145 | - * Called before an index is initiated. |
|
146 | - * Best place to initiate some stuff on the Search Server (mapping, ...) |
|
147 | - * |
|
148 | - * @since 15.0.0 |
|
149 | - */ |
|
150 | - public function initializeIndex(); |
|
151 | - |
|
152 | - |
|
153 | - /** |
|
154 | - * Reset the indexes for a specific providerId. |
|
155 | - * $providerId can be 'all' if it is a global reset. |
|
156 | - * |
|
157 | - * @since 15.0.0 |
|
158 | - * |
|
159 | - * @param string $providerId |
|
160 | - */ |
|
161 | - public function resetIndex(string $providerId); |
|
162 | - |
|
163 | - |
|
164 | - /** |
|
165 | - * Deleting some IIndex, sent in an array |
|
166 | - * |
|
167 | - * @see IIndex |
|
168 | - * |
|
169 | - * @since 15.0.0 |
|
170 | - * |
|
171 | - * @param IIndex[] $indexes |
|
172 | - */ |
|
173 | - public function deleteIndexes(array $indexes); |
|
174 | - |
|
175 | - |
|
176 | - /** |
|
177 | - * Indexing a document. |
|
178 | - * |
|
179 | - * @see IndexDocument |
|
180 | - * |
|
181 | - * @since 15.0.0 |
|
182 | - * |
|
183 | - * @param IIndexDocument $document |
|
184 | - * |
|
185 | - * @return IIndex |
|
186 | - */ |
|
187 | - public function indexDocument(IIndexDocument $document): IIndex; |
|
188 | - |
|
189 | - |
|
190 | - /** |
|
191 | - * Searching documents, ISearchResult should be updated with the result of |
|
192 | - * the search. |
|
193 | - * |
|
194 | - * @since 15.0.0 |
|
195 | - * |
|
196 | - * @param ISearchResult $result |
|
197 | - * @param IDocumentAccess $access |
|
198 | - */ |
|
199 | - public function searchRequest(ISearchResult $result, IDocumentAccess $access); |
|
200 | - |
|
201 | - |
|
202 | - /** |
|
203 | - * Return a document based on its Id and the Provider. |
|
204 | - * This is used when an admin execute ./occ fulltextsearch:document:platform |
|
205 | - * |
|
206 | - * @since 15.0.0 |
|
207 | - * |
|
208 | - * @param string $providerId |
|
209 | - * @param string $documentId |
|
210 | - * |
|
211 | - * @return IIndexDocument |
|
212 | - */ |
|
213 | - public function getDocument(string $providerId, string $documentId): IIndexDocument; |
|
73 | + /** |
|
74 | + * Must returns a unique Id used to identify the Search Platform. |
|
75 | + * Id must contains only alphanumeric chars, with no space. |
|
76 | + * |
|
77 | + * @since 15.0.0 |
|
78 | + * |
|
79 | + * @return string |
|
80 | + */ |
|
81 | + public function getId(): string; |
|
82 | + |
|
83 | + |
|
84 | + /** |
|
85 | + * Must returns a descriptive name of the Search Platform. |
|
86 | + * This is used mainly in the admin settings page to display the list of |
|
87 | + * available Search Platform |
|
88 | + * |
|
89 | + * @since 15.0.0 |
|
90 | + * |
|
91 | + * @return string |
|
92 | + */ |
|
93 | + public function getName(): string; |
|
94 | + |
|
95 | + |
|
96 | + /** |
|
97 | + * should returns the current configuration of the Search Platform. |
|
98 | + * This is used to display the configuration when using the |
|
99 | + * ./occ fulltextsearch:check command line. |
|
100 | + * |
|
101 | + * @since 15.0.0 |
|
102 | + * |
|
103 | + * @return array |
|
104 | + */ |
|
105 | + public function getConfiguration(): array; |
|
106 | + |
|
107 | + |
|
108 | + /** |
|
109 | + * Set the wrapper of the currently executed process. |
|
110 | + * Because the index process can be long and heavy, and because errors can |
|
111 | + * be encountered during the process, the IRunner is a wrapper that allow the |
|
112 | + * Search Platform to communicate with the process initiated by |
|
113 | + * FullTextSearch. |
|
114 | + * |
|
115 | + * The IRunner is coming with some methods so the Search Platform can |
|
116 | + * returns important information and errors to be displayed to the admin. |
|
117 | + * |
|
118 | + * @since 15.0.0 |
|
119 | + * |
|
120 | + * @param IRunner $runner |
|
121 | + */ |
|
122 | + public function setRunner(IRunner $runner); |
|
123 | + |
|
124 | + |
|
125 | + /** |
|
126 | + * Called when FullTextSearch is loading your Search Platform. |
|
127 | + * |
|
128 | + * @since 15.0.0 |
|
129 | + */ |
|
130 | + public function loadPlatform(); |
|
131 | + |
|
132 | + |
|
133 | + /** |
|
134 | + * Called to check that your Search Platform is correctly configured and that |
|
135 | + * This is also the right place to check that the Search Service is available. |
|
136 | + * |
|
137 | + * @since 15.0.0 |
|
138 | + * |
|
139 | + * @return bool |
|
140 | + */ |
|
141 | + public function testPlatform(): bool; |
|
142 | + |
|
143 | + |
|
144 | + /** |
|
145 | + * Called before an index is initiated. |
|
146 | + * Best place to initiate some stuff on the Search Server (mapping, ...) |
|
147 | + * |
|
148 | + * @since 15.0.0 |
|
149 | + */ |
|
150 | + public function initializeIndex(); |
|
151 | + |
|
152 | + |
|
153 | + /** |
|
154 | + * Reset the indexes for a specific providerId. |
|
155 | + * $providerId can be 'all' if it is a global reset. |
|
156 | + * |
|
157 | + * @since 15.0.0 |
|
158 | + * |
|
159 | + * @param string $providerId |
|
160 | + */ |
|
161 | + public function resetIndex(string $providerId); |
|
162 | + |
|
163 | + |
|
164 | + /** |
|
165 | + * Deleting some IIndex, sent in an array |
|
166 | + * |
|
167 | + * @see IIndex |
|
168 | + * |
|
169 | + * @since 15.0.0 |
|
170 | + * |
|
171 | + * @param IIndex[] $indexes |
|
172 | + */ |
|
173 | + public function deleteIndexes(array $indexes); |
|
174 | + |
|
175 | + |
|
176 | + /** |
|
177 | + * Indexing a document. |
|
178 | + * |
|
179 | + * @see IndexDocument |
|
180 | + * |
|
181 | + * @since 15.0.0 |
|
182 | + * |
|
183 | + * @param IIndexDocument $document |
|
184 | + * |
|
185 | + * @return IIndex |
|
186 | + */ |
|
187 | + public function indexDocument(IIndexDocument $document): IIndex; |
|
188 | + |
|
189 | + |
|
190 | + /** |
|
191 | + * Searching documents, ISearchResult should be updated with the result of |
|
192 | + * the search. |
|
193 | + * |
|
194 | + * @since 15.0.0 |
|
195 | + * |
|
196 | + * @param ISearchResult $result |
|
197 | + * @param IDocumentAccess $access |
|
198 | + */ |
|
199 | + public function searchRequest(ISearchResult $result, IDocumentAccess $access); |
|
200 | + |
|
201 | + |
|
202 | + /** |
|
203 | + * Return a document based on its Id and the Provider. |
|
204 | + * This is used when an admin execute ./occ fulltextsearch:document:platform |
|
205 | + * |
|
206 | + * @since 15.0.0 |
|
207 | + * |
|
208 | + * @param string $providerId |
|
209 | + * @param string $documentId |
|
210 | + * |
|
211 | + * @return IIndexDocument |
|
212 | + */ |
|
213 | + public function getDocument(string $providerId, string $documentId): IIndexDocument; |
|
214 | 214 | } |
@@ -41,143 +41,143 @@ |
||
41 | 41 | * |
42 | 42 | */ |
43 | 43 | interface IFullTextSearchManager { |
44 | - /** |
|
45 | - * Register a IProviderService. |
|
46 | - * |
|
47 | - * @since 15.0.0 |
|
48 | - * |
|
49 | - * @param IProviderService $providerService |
|
50 | - */ |
|
51 | - public function registerProviderService(IProviderService $providerService); |
|
52 | - |
|
53 | - /** |
|
54 | - * Register a IIndexService. |
|
55 | - * |
|
56 | - * @since 15.0.0 |
|
57 | - * |
|
58 | - * @param IIndexService $indexService |
|
59 | - */ |
|
60 | - public function registerIndexService(IIndexService $indexService); |
|
61 | - |
|
62 | - /** |
|
63 | - * Register a ISearchService. |
|
64 | - * |
|
65 | - * @since 15.0.0 |
|
66 | - * |
|
67 | - * @param ISearchService $searchService |
|
68 | - */ |
|
69 | - public function registerSearchService(ISearchService $searchService); |
|
70 | - |
|
71 | - /** |
|
72 | - * returns true is Full Text Search is available (app is present and Service |
|
73 | - * are registered) |
|
74 | - * |
|
75 | - * @since 16.0.0 |
|
76 | - * |
|
77 | - * @return bool |
|
78 | - */ |
|
79 | - public function isAvailable(): bool; |
|
80 | - |
|
81 | - |
|
82 | - /** |
|
83 | - * Add the Javascript API in the navigation page of an app. |
|
84 | - * Needed to replace the default search. |
|
85 | - * |
|
86 | - * @since 15.0.0 |
|
87 | - */ |
|
88 | - public function addJavascriptAPI(); |
|
89 | - |
|
90 | - |
|
91 | - /** |
|
92 | - * Check if the provider $providerId is already indexed. |
|
93 | - * |
|
94 | - * @since 15.0.0 |
|
95 | - * |
|
96 | - * @param string $providerId |
|
97 | - * |
|
98 | - * @return bool |
|
99 | - */ |
|
100 | - public function isProviderIndexed(string $providerId): bool; |
|
101 | - |
|
102 | - |
|
103 | - /** |
|
104 | - * Retrieve an Index from the database, based on the Id of the Provider |
|
105 | - * and the Id of the Document |
|
106 | - * |
|
107 | - * @since 15.0.0 |
|
108 | - * |
|
109 | - * @param string $providerId |
|
110 | - * @param string $documentId |
|
111 | - * |
|
112 | - * @return IIndex |
|
113 | - */ |
|
114 | - public function getIndex(string $providerId, string $documentId): IIndex; |
|
115 | - |
|
116 | - |
|
117 | - /** |
|
118 | - * Create a new Index. |
|
119 | - * |
|
120 | - * This method must be called when a new document is created. |
|
121 | - * |
|
122 | - * @since 15.0.0 |
|
123 | - * |
|
124 | - * @param string $providerId |
|
125 | - * @param string $documentId |
|
126 | - * @param string $userId |
|
127 | - * @param int $status |
|
128 | - * |
|
129 | - * @return IIndex |
|
130 | - */ |
|
131 | - public function createIndex(string $providerId, string $documentId, string $userId, int $status = 0): IIndex; |
|
132 | - |
|
133 | - |
|
134 | - /** |
|
135 | - * Update the status of an Index. status is a bitflag, setting $reset to |
|
136 | - * true will reset the status to the value defined in the parameter. |
|
137 | - * |
|
138 | - * @since 15.0.0 |
|
139 | - * |
|
140 | - * @param string $providerId |
|
141 | - * @param string $documentId |
|
142 | - * @param int $status |
|
143 | - * @param bool $reset |
|
144 | - */ |
|
145 | - public function updateIndexStatus(string $providerId, string $documentId, int $status, bool $reset = false); |
|
146 | - |
|
147 | - |
|
148 | - /** |
|
149 | - * Update the status of an array of Index. status is a bit flag, setting $reset to |
|
150 | - * true will reset the status to the value defined in the parameter. |
|
151 | - * |
|
152 | - * @since 15.0.0 |
|
153 | - * |
|
154 | - * @param string $providerId |
|
155 | - * @param array $documentIds |
|
156 | - * @param int $status |
|
157 | - * @param bool $reset |
|
158 | - */ |
|
159 | - public function updateIndexesStatus(string $providerId, array $documentIds, int $status, bool $reset = false); |
|
160 | - |
|
161 | - /** |
|
162 | - * Update an array of Index. |
|
163 | - * |
|
164 | - * @since 15.0.0 |
|
165 | - * |
|
166 | - * @param IIndex[] $indexes |
|
167 | - */ |
|
168 | - public function updateIndexes(array $indexes); |
|
169 | - |
|
170 | - /** |
|
171 | - * Search using an array as request. If $userId is empty, will use the |
|
172 | - * current session. |
|
173 | - * |
|
174 | - * @see ISearchService::generateSearchRequest |
|
175 | - * |
|
176 | - * @since 15.0.0 |
|
177 | - * |
|
178 | - * @param array $request |
|
179 | - * @param string $userId |
|
180 | - * @return ISearchResult[] |
|
181 | - */ |
|
182 | - public function search(array $request, string $userId = ''): array; |
|
44 | + /** |
|
45 | + * Register a IProviderService. |
|
46 | + * |
|
47 | + * @since 15.0.0 |
|
48 | + * |
|
49 | + * @param IProviderService $providerService |
|
50 | + */ |
|
51 | + public function registerProviderService(IProviderService $providerService); |
|
52 | + |
|
53 | + /** |
|
54 | + * Register a IIndexService. |
|
55 | + * |
|
56 | + * @since 15.0.0 |
|
57 | + * |
|
58 | + * @param IIndexService $indexService |
|
59 | + */ |
|
60 | + public function registerIndexService(IIndexService $indexService); |
|
61 | + |
|
62 | + /** |
|
63 | + * Register a ISearchService. |
|
64 | + * |
|
65 | + * @since 15.0.0 |
|
66 | + * |
|
67 | + * @param ISearchService $searchService |
|
68 | + */ |
|
69 | + public function registerSearchService(ISearchService $searchService); |
|
70 | + |
|
71 | + /** |
|
72 | + * returns true is Full Text Search is available (app is present and Service |
|
73 | + * are registered) |
|
74 | + * |
|
75 | + * @since 16.0.0 |
|
76 | + * |
|
77 | + * @return bool |
|
78 | + */ |
|
79 | + public function isAvailable(): bool; |
|
80 | + |
|
81 | + |
|
82 | + /** |
|
83 | + * Add the Javascript API in the navigation page of an app. |
|
84 | + * Needed to replace the default search. |
|
85 | + * |
|
86 | + * @since 15.0.0 |
|
87 | + */ |
|
88 | + public function addJavascriptAPI(); |
|
89 | + |
|
90 | + |
|
91 | + /** |
|
92 | + * Check if the provider $providerId is already indexed. |
|
93 | + * |
|
94 | + * @since 15.0.0 |
|
95 | + * |
|
96 | + * @param string $providerId |
|
97 | + * |
|
98 | + * @return bool |
|
99 | + */ |
|
100 | + public function isProviderIndexed(string $providerId): bool; |
|
101 | + |
|
102 | + |
|
103 | + /** |
|
104 | + * Retrieve an Index from the database, based on the Id of the Provider |
|
105 | + * and the Id of the Document |
|
106 | + * |
|
107 | + * @since 15.0.0 |
|
108 | + * |
|
109 | + * @param string $providerId |
|
110 | + * @param string $documentId |
|
111 | + * |
|
112 | + * @return IIndex |
|
113 | + */ |
|
114 | + public function getIndex(string $providerId, string $documentId): IIndex; |
|
115 | + |
|
116 | + |
|
117 | + /** |
|
118 | + * Create a new Index. |
|
119 | + * |
|
120 | + * This method must be called when a new document is created. |
|
121 | + * |
|
122 | + * @since 15.0.0 |
|
123 | + * |
|
124 | + * @param string $providerId |
|
125 | + * @param string $documentId |
|
126 | + * @param string $userId |
|
127 | + * @param int $status |
|
128 | + * |
|
129 | + * @return IIndex |
|
130 | + */ |
|
131 | + public function createIndex(string $providerId, string $documentId, string $userId, int $status = 0): IIndex; |
|
132 | + |
|
133 | + |
|
134 | + /** |
|
135 | + * Update the status of an Index. status is a bitflag, setting $reset to |
|
136 | + * true will reset the status to the value defined in the parameter. |
|
137 | + * |
|
138 | + * @since 15.0.0 |
|
139 | + * |
|
140 | + * @param string $providerId |
|
141 | + * @param string $documentId |
|
142 | + * @param int $status |
|
143 | + * @param bool $reset |
|
144 | + */ |
|
145 | + public function updateIndexStatus(string $providerId, string $documentId, int $status, bool $reset = false); |
|
146 | + |
|
147 | + |
|
148 | + /** |
|
149 | + * Update the status of an array of Index. status is a bit flag, setting $reset to |
|
150 | + * true will reset the status to the value defined in the parameter. |
|
151 | + * |
|
152 | + * @since 15.0.0 |
|
153 | + * |
|
154 | + * @param string $providerId |
|
155 | + * @param array $documentIds |
|
156 | + * @param int $status |
|
157 | + * @param bool $reset |
|
158 | + */ |
|
159 | + public function updateIndexesStatus(string $providerId, array $documentIds, int $status, bool $reset = false); |
|
160 | + |
|
161 | + /** |
|
162 | + * Update an array of Index. |
|
163 | + * |
|
164 | + * @since 15.0.0 |
|
165 | + * |
|
166 | + * @param IIndex[] $indexes |
|
167 | + */ |
|
168 | + public function updateIndexes(array $indexes); |
|
169 | + |
|
170 | + /** |
|
171 | + * Search using an array as request. If $userId is empty, will use the |
|
172 | + * current session. |
|
173 | + * |
|
174 | + * @see ISearchService::generateSearchRequest |
|
175 | + * |
|
176 | + * @since 15.0.0 |
|
177 | + * |
|
178 | + * @param array $request |
|
179 | + * @param string $userId |
|
180 | + * @return ISearchResult[] |
|
181 | + */ |
|
182 | + public function search(array $request, string $userId = ''): array; |
|
183 | 183 | } |
@@ -31,24 +31,24 @@ |
||
31 | 31 | * @since 18.0.0 |
32 | 32 | */ |
33 | 33 | class BeforeFolderScannedEvent extends Event { |
34 | - /** @var string */ |
|
35 | - private $absolutePath; |
|
34 | + /** @var string */ |
|
35 | + private $absolutePath; |
|
36 | 36 | |
37 | - /** |
|
38 | - * @param string $absolutePath |
|
39 | - * |
|
40 | - * @since 18.0.0 |
|
41 | - */ |
|
42 | - public function __construct(string $absolutePath) { |
|
43 | - parent::__construct(); |
|
44 | - $this->absolutePath = $absolutePath; |
|
45 | - } |
|
37 | + /** |
|
38 | + * @param string $absolutePath |
|
39 | + * |
|
40 | + * @since 18.0.0 |
|
41 | + */ |
|
42 | + public function __construct(string $absolutePath) { |
|
43 | + parent::__construct(); |
|
44 | + $this->absolutePath = $absolutePath; |
|
45 | + } |
|
46 | 46 | |
47 | - /** |
|
48 | - * @return string |
|
49 | - * @since 18.0.0 |
|
50 | - */ |
|
51 | - public function getAbsolutePath(): string { |
|
52 | - return $this->absolutePath; |
|
53 | - } |
|
47 | + /** |
|
48 | + * @return string |
|
49 | + * @since 18.0.0 |
|
50 | + */ |
|
51 | + public function getAbsolutePath(): string { |
|
52 | + return $this->absolutePath; |
|
53 | + } |
|
54 | 54 | } |
@@ -31,24 +31,24 @@ |
||
31 | 31 | * @since 18.0.0 |
32 | 32 | */ |
33 | 33 | class BeforeFileScannedEvent extends Event { |
34 | - /** @var string */ |
|
35 | - private $absolutePath; |
|
34 | + /** @var string */ |
|
35 | + private $absolutePath; |
|
36 | 36 | |
37 | - /** |
|
38 | - * @param string $absolutePath |
|
39 | - * |
|
40 | - * @since 18.0.0 |
|
41 | - */ |
|
42 | - public function __construct(string $absolutePath) { |
|
43 | - parent::__construct(); |
|
44 | - $this->absolutePath = $absolutePath; |
|
45 | - } |
|
37 | + /** |
|
38 | + * @param string $absolutePath |
|
39 | + * |
|
40 | + * @since 18.0.0 |
|
41 | + */ |
|
42 | + public function __construct(string $absolutePath) { |
|
43 | + parent::__construct(); |
|
44 | + $this->absolutePath = $absolutePath; |
|
45 | + } |
|
46 | 46 | |
47 | - /** |
|
48 | - * @return string |
|
49 | - * @since 18.0.0 |
|
50 | - */ |
|
51 | - public function getAbsolutePath(): string { |
|
52 | - return $this->absolutePath; |
|
53 | - } |
|
47 | + /** |
|
48 | + * @return string |
|
49 | + * @since 18.0.0 |
|
50 | + */ |
|
51 | + public function getAbsolutePath(): string { |
|
52 | + return $this->absolutePath; |
|
53 | + } |
|
54 | 54 | } |