Completed
Push — master ( 317cd2...e80d89 )
by Daniel
38:10 queued 20:59
created
lib/public/FullTextSearch/IFullTextSearchProvider.php 1 patch
Indentation   +240 added lines, -240 removed lines patch added patch discarded remove patch
@@ -71,244 +71,244 @@
 block discarded – undo
71 71
  *
72 72
  */
73 73
 interface IFullTextSearchProvider {
74
-	/**
75
-	 * Must returns a unique Id used to identify the Content Provider.
76
-	 * Id must contains only alphanumeric chars, with no space.
77
-	 *
78
-	 * @since 15.0.0
79
-	 *
80
-	 * @return string
81
-	 */
82
-	public function getId(): string;
83
-
84
-
85
-	/**
86
-	 * Must returns a descriptive name of the Content Provider.
87
-	 * This is used in multiple places, so better use a clear display name.
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 Content Provider.
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
-	 * Must returns a ISearchTemplate that contains displayable items and
110
-	 * available options to users when searching.
111
-	 *
112
-	 * @see ISearchTemplate
113
-	 *
114
-	 * @since 15.0.0
115
-	 *
116
-	 * @return ISearchTemplate
117
-	 */
118
-	public function getSearchTemplate(): ISearchTemplate;
119
-
120
-
121
-	/**
122
-	 * Called when FullTextSearch is loading your Content Provider.
123
-	 *
124
-	 * @since 15.0.0
125
-	 */
126
-	public function loadProvider();
127
-
128
-
129
-	/**
130
-	 * Set the wrapper of the currently executed process.
131
-	 * Because the index process can be long and heavy, and because errors can
132
-	 * be encountered during the process, the IRunner is a wrapper that allow the
133
-	 * Content Provider to communicate with the process initiated by
134
-	 * FullTextSearch.
135
-	 *
136
-	 * The IRunner is coming with some methods so the Content Provider can
137
-	 * returns important information and errors to be displayed to the admin.
138
-	 *
139
-	 * @since 15.0.0
140
-	 *
141
-	 * @param IRunner $runner
142
-	 */
143
-	public function setRunner(IRunner $runner);
144
-
145
-
146
-	/**
147
-	 * This method is called when the administrator specify options when running
148
-	 * the ./occ fulltextsearch:index or ./occ fulltextsearch:live
149
-	 *
150
-	 * @since 15.0.0
151
-	 *
152
-	 * @param IIndexOptions $options
153
-	 */
154
-	public function setIndexOptions(IIndexOptions $options);
155
-
156
-
157
-	/**
158
-	 * Allow the provider to generate a list of chunk to split a huge list of
159
-	 * indexable documents
160
-	 *
161
-	 * During the indexing the generateIndexableDocuments method will be called
162
-	 * for each entry of the returned array.
163
-	 * If the returned array is empty, the generateIndexableDocuments() will be
164
-	 * called only once (per user).
165
-	 *
166
-	 * @since 16.0.0
167
-	 *
168
-	 * @param string $userId
169
-	 *
170
-	 * @return string[]
171
-	 */
172
-	public function generateChunks(string $userId): array;
173
-
174
-
175
-	/**
176
-	 * Returns all indexable document for a user as an array of IIndexDocument.
177
-	 *
178
-	 * There is no need to fill each IIndexDocument with content; at this point,
179
-	 * only fill the object with the minimum information to not waste memory while
180
-	 * still being able to identify the document it is referring to.
181
-	 *
182
-	 * FullTextSearch will call 2 other methods of this interface for each
183
-	 * IIndexDocument of the array, prior to their indexing:
184
-	 *
185
-	 * - first, to compare the date of the last index,
186
-	 * - then, to fill each IIndexDocument with complete data
187
-	 *
188
-	 * @see IIndexDocument
189
-	 *
190
-	 * @since 15.0.0
191
-	 *  -> 16.0.0: the parameter "$chunk" was added
192
-	 *
193
-	 * @param string $userId
194
-	 * @param string $chunk
195
-	 *
196
-	 * @return IIndexDocument[]
197
-	 */
198
-	public function generateIndexableDocuments(string $userId, string $chunk): array;
199
-
200
-
201
-	/**
202
-	 * Called to verify that the document is not already indexed and that the
203
-	 * old index is not up-to-date, using the IIndex from
204
-	 * IIndexDocument->getIndex()
205
-	 *
206
-	 * Returning true will not queue the current IIndexDocument to any further
207
-	 * operation and will continue on the next element from the list returned by
208
-	 * generateIndexableDocuments().
209
-	 *
210
-	 * @since 15.0.0
211
-	 *
212
-	 * @param IIndexDocument $document
213
-	 *
214
-	 * @return bool
215
-	 */
216
-	public function isDocumentUpToDate(IIndexDocument $document): bool;
217
-
218
-
219
-	/**
220
-	 * Must fill IIndexDocument with all information relative to the document,
221
-	 * before its indexing by the Search Platform.
222
-	 *
223
-	 * Method is called for each element returned previously by
224
-	 * generateIndexableDocuments().
225
-	 *
226
-	 * @see IIndexDocument
227
-	 *
228
-	 * @since 15.0.0
229
-	 *
230
-	 * @param IIndexDocument $document
231
-	 */
232
-	public function fillIndexDocument(IIndexDocument $document);
233
-
234
-
235
-	/**
236
-	 * The Search Provider must create and return an IIndexDocument
237
-	 * based on the IIndex and its status. The IIndexDocument must contains all
238
-	 * information as it will be send for indexing.
239
-	 *
240
-	 * Method is called during a cron or a ./occ fulltextsearch:live after a
241
-	 * new document is created, or an old document is set as modified.
242
-	 *
243
-	 * @since 15.0.0
244
-	 *
245
-	 * @param IIndex $index
246
-	 *
247
-	 * @return IIndexDocument
248
-	 */
249
-	public function updateDocument(IIndex $index): IIndexDocument;
250
-
251
-
252
-	/**
253
-	 * Called when an index is initiated by the administrator.
254
-	 * This is should only be used in case of a specific mapping is needed.
255
-	 * (ie. _almost_ never)
256
-	 *
257
-	 * @since 15.0.0
258
-	 *
259
-	 * @param IFullTextSearchPlatform $platform
260
-	 */
261
-	public function onInitializingIndex(IFullTextSearchPlatform $platform);
262
-
263
-
264
-	/**
265
-	 * Called when administrator is resetting the index.
266
-	 * This is should only be used in case of a specific mapping has been
267
-	 * created.
268
-	 *
269
-	 * @since 15.0.0
270
-	 *
271
-	 * @param IFullTextSearchPlatform $platform
272
-	 */
273
-	public function onResettingIndex(IFullTextSearchPlatform $platform);
274
-
275
-
276
-	/**
277
-	 * Method is called when a search request is initiated by a user, prior to
278
-	 * be sent to the Search Platform.
279
-	 *
280
-	 * Your Content Provider can interact with the ISearchRequest to apply the
281
-	 * search options and make the search more precise.
282
-	 *
283
-	 * @see ISearchRequest
284
-	 *
285
-	 * @since 15.0.0
286
-	 *
287
-	 * @param ISearchRequest $searchRequest
288
-	 */
289
-	public function improveSearchRequest(ISearchRequest $searchRequest);
290
-
291
-
292
-	/**
293
-	 * Method is called after results of a search are returned by the
294
-	 * Search Platform.
295
-	 *
296
-	 * Your Content Provider can detail each entry with local data to improve
297
-	 * the display of the search result.
298
-	 *
299
-	 * @see ISearchResult
300
-	 *
301
-	 * @since 15.0.0
302
-	 *
303
-	 * @param ISearchResult $searchResult
304
-	 */
305
-	public function improveSearchResult(ISearchResult $searchResult);
306
-
307
-
308
-	/**
309
-	 * not used yet.
310
-	 *
311
-	 * @since 15.0.0
312
-	 */
313
-	public function unloadProvider();
74
+    /**
75
+     * Must returns a unique Id used to identify the Content Provider.
76
+     * Id must contains only alphanumeric chars, with no space.
77
+     *
78
+     * @since 15.0.0
79
+     *
80
+     * @return string
81
+     */
82
+    public function getId(): string;
83
+
84
+
85
+    /**
86
+     * Must returns a descriptive name of the Content Provider.
87
+     * This is used in multiple places, so better use a clear display name.
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 Content Provider.
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
+     * Must returns a ISearchTemplate that contains displayable items and
110
+     * available options to users when searching.
111
+     *
112
+     * @see ISearchTemplate
113
+     *
114
+     * @since 15.0.0
115
+     *
116
+     * @return ISearchTemplate
117
+     */
118
+    public function getSearchTemplate(): ISearchTemplate;
119
+
120
+
121
+    /**
122
+     * Called when FullTextSearch is loading your Content Provider.
123
+     *
124
+     * @since 15.0.0
125
+     */
126
+    public function loadProvider();
127
+
128
+
129
+    /**
130
+     * Set the wrapper of the currently executed process.
131
+     * Because the index process can be long and heavy, and because errors can
132
+     * be encountered during the process, the IRunner is a wrapper that allow the
133
+     * Content Provider to communicate with the process initiated by
134
+     * FullTextSearch.
135
+     *
136
+     * The IRunner is coming with some methods so the Content Provider can
137
+     * returns important information and errors to be displayed to the admin.
138
+     *
139
+     * @since 15.0.0
140
+     *
141
+     * @param IRunner $runner
142
+     */
143
+    public function setRunner(IRunner $runner);
144
+
145
+
146
+    /**
147
+     * This method is called when the administrator specify options when running
148
+     * the ./occ fulltextsearch:index or ./occ fulltextsearch:live
149
+     *
150
+     * @since 15.0.0
151
+     *
152
+     * @param IIndexOptions $options
153
+     */
154
+    public function setIndexOptions(IIndexOptions $options);
155
+
156
+
157
+    /**
158
+     * Allow the provider to generate a list of chunk to split a huge list of
159
+     * indexable documents
160
+     *
161
+     * During the indexing the generateIndexableDocuments method will be called
162
+     * for each entry of the returned array.
163
+     * If the returned array is empty, the generateIndexableDocuments() will be
164
+     * called only once (per user).
165
+     *
166
+     * @since 16.0.0
167
+     *
168
+     * @param string $userId
169
+     *
170
+     * @return string[]
171
+     */
172
+    public function generateChunks(string $userId): array;
173
+
174
+
175
+    /**
176
+     * Returns all indexable document for a user as an array of IIndexDocument.
177
+     *
178
+     * There is no need to fill each IIndexDocument with content; at this point,
179
+     * only fill the object with the minimum information to not waste memory while
180
+     * still being able to identify the document it is referring to.
181
+     *
182
+     * FullTextSearch will call 2 other methods of this interface for each
183
+     * IIndexDocument of the array, prior to their indexing:
184
+     *
185
+     * - first, to compare the date of the last index,
186
+     * - then, to fill each IIndexDocument with complete data
187
+     *
188
+     * @see IIndexDocument
189
+     *
190
+     * @since 15.0.0
191
+     *  -> 16.0.0: the parameter "$chunk" was added
192
+     *
193
+     * @param string $userId
194
+     * @param string $chunk
195
+     *
196
+     * @return IIndexDocument[]
197
+     */
198
+    public function generateIndexableDocuments(string $userId, string $chunk): array;
199
+
200
+
201
+    /**
202
+     * Called to verify that the document is not already indexed and that the
203
+     * old index is not up-to-date, using the IIndex from
204
+     * IIndexDocument->getIndex()
205
+     *
206
+     * Returning true will not queue the current IIndexDocument to any further
207
+     * operation and will continue on the next element from the list returned by
208
+     * generateIndexableDocuments().
209
+     *
210
+     * @since 15.0.0
211
+     *
212
+     * @param IIndexDocument $document
213
+     *
214
+     * @return bool
215
+     */
216
+    public function isDocumentUpToDate(IIndexDocument $document): bool;
217
+
218
+
219
+    /**
220
+     * Must fill IIndexDocument with all information relative to the document,
221
+     * before its indexing by the Search Platform.
222
+     *
223
+     * Method is called for each element returned previously by
224
+     * generateIndexableDocuments().
225
+     *
226
+     * @see IIndexDocument
227
+     *
228
+     * @since 15.0.0
229
+     *
230
+     * @param IIndexDocument $document
231
+     */
232
+    public function fillIndexDocument(IIndexDocument $document);
233
+
234
+
235
+    /**
236
+     * The Search Provider must create and return an IIndexDocument
237
+     * based on the IIndex and its status. The IIndexDocument must contains all
238
+     * information as it will be send for indexing.
239
+     *
240
+     * Method is called during a cron or a ./occ fulltextsearch:live after a
241
+     * new document is created, or an old document is set as modified.
242
+     *
243
+     * @since 15.0.0
244
+     *
245
+     * @param IIndex $index
246
+     *
247
+     * @return IIndexDocument
248
+     */
249
+    public function updateDocument(IIndex $index): IIndexDocument;
250
+
251
+
252
+    /**
253
+     * Called when an index is initiated by the administrator.
254
+     * This is should only be used in case of a specific mapping is needed.
255
+     * (ie. _almost_ never)
256
+     *
257
+     * @since 15.0.0
258
+     *
259
+     * @param IFullTextSearchPlatform $platform
260
+     */
261
+    public function onInitializingIndex(IFullTextSearchPlatform $platform);
262
+
263
+
264
+    /**
265
+     * Called when administrator is resetting the index.
266
+     * This is should only be used in case of a specific mapping has been
267
+     * created.
268
+     *
269
+     * @since 15.0.0
270
+     *
271
+     * @param IFullTextSearchPlatform $platform
272
+     */
273
+    public function onResettingIndex(IFullTextSearchPlatform $platform);
274
+
275
+
276
+    /**
277
+     * Method is called when a search request is initiated by a user, prior to
278
+     * be sent to the Search Platform.
279
+     *
280
+     * Your Content Provider can interact with the ISearchRequest to apply the
281
+     * search options and make the search more precise.
282
+     *
283
+     * @see ISearchRequest
284
+     *
285
+     * @since 15.0.0
286
+     *
287
+     * @param ISearchRequest $searchRequest
288
+     */
289
+    public function improveSearchRequest(ISearchRequest $searchRequest);
290
+
291
+
292
+    /**
293
+     * Method is called after results of a search are returned by the
294
+     * Search Platform.
295
+     *
296
+     * Your Content Provider can detail each entry with local data to improve
297
+     * the display of the search result.
298
+     *
299
+     * @see ISearchResult
300
+     *
301
+     * @since 15.0.0
302
+     *
303
+     * @param ISearchResult $searchResult
304
+     */
305
+    public function improveSearchResult(ISearchResult $searchResult);
306
+
307
+
308
+    /**
309
+     * not used yet.
310
+     *
311
+     * @since 15.0.0
312
+     */
313
+    public function unloadProvider();
314 314
 }
Please login to merge, or discard this patch.
lib/public/FullTextSearch/Service/IProviderService.php 1 patch
Indentation   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -32,22 +32,22 @@
 block discarded – undo
32 32
  *
33 33
  */
34 34
 interface IProviderService {
35
-	/**
36
-	 * Check if the provider $providerId is already indexed.
37
-	 *
38
-	 * @since 15.0.0
39
-	 *
40
-	 * @param string $providerId
41
-	 *
42
-	 * @return bool
43
-	 */
44
-	public function isProviderIndexed(string $providerId);
35
+    /**
36
+     * Check if the provider $providerId is already indexed.
37
+     *
38
+     * @since 15.0.0
39
+     *
40
+     * @param string $providerId
41
+     *
42
+     * @return bool
43
+     */
44
+    public function isProviderIndexed(string $providerId);
45 45
 
46 46
 
47
-	/**
48
-	 * Add the Javascript API in the navigation page of an app.
49
-	 *
50
-	 * @since 15.0.0
51
-	 */
52
-	public function addJavascriptAPI();
47
+    /**
48
+     * Add the Javascript API in the navigation page of an app.
49
+     *
50
+     * @since 15.0.0
51
+     */
52
+    public function addJavascriptAPI();
53 53
 }
Please login to merge, or discard this patch.
lib/public/FullTextSearch/Service/IIndexService.php 1 patch
Indentation   +56 added lines, -56 removed lines patch added patch discarded remove patch
@@ -34,68 +34,68 @@
 block discarded – undo
34 34
  *
35 35
  */
36 36
 interface IIndexService {
37
-	/**
38
-	 * Create an Index
39
-	 *
40
-	 * @since 15.0.1
41
-	 *
42
-	 * @param string $providerId
43
-	 * @param string $documentId
44
-	 * @param string $userId
45
-	 * @param int $status
46
-	 * @return IIndex
47
-	 */
48
-	public function createIndex(string $providerId, string $documentId, string $userId, int $status): IIndex;
37
+    /**
38
+     * Create an Index
39
+     *
40
+     * @since 15.0.1
41
+     *
42
+     * @param string $providerId
43
+     * @param string $documentId
44
+     * @param string $userId
45
+     * @param int $status
46
+     * @return IIndex
47
+     */
48
+    public function createIndex(string $providerId, string $documentId, string $userId, int $status): IIndex;
49 49
 
50 50
 
51
-	/**
52
-	 * Retrieve an Index from the database, based on the Id of the Provider
53
-	 * and the Id of the Document
54
-	 *
55
-	 * @since 15.0.0
56
-	 *
57
-	 * @param string $providerId
58
-	 * @param string $documentId
59
-	 *
60
-	 * @return IIndex
61
-	 */
62
-	public function getIndex(string $providerId, string $documentId): IIndex;
51
+    /**
52
+     * Retrieve an Index from the database, based on the Id of the Provider
53
+     * and the Id of the Document
54
+     *
55
+     * @since 15.0.0
56
+     *
57
+     * @param string $providerId
58
+     * @param string $documentId
59
+     *
60
+     * @return IIndex
61
+     */
62
+    public function getIndex(string $providerId, string $documentId): IIndex;
63 63
 
64 64
 
65
-	/**
66
-	 * Update the status of an Index. status is a bit flag, setting $reset to
67
-	 * true will reset the status to the value defined in the parameter.
68
-	 *
69
-	 * @since 15.0.0
70
-	 *
71
-	 * @param string $providerId
72
-	 * @param string $documentId
73
-	 * @param int $status
74
-	 * @param bool $reset
75
-	 */
76
-	public function updateIndexStatus(string $providerId, string $documentId, int $status, bool $reset = false);
65
+    /**
66
+     * Update the status of an Index. status is a bit flag, setting $reset to
67
+     * true will reset the status to the value defined in the parameter.
68
+     *
69
+     * @since 15.0.0
70
+     *
71
+     * @param string $providerId
72
+     * @param string $documentId
73
+     * @param int $status
74
+     * @param bool $reset
75
+     */
76
+    public function updateIndexStatus(string $providerId, string $documentId, int $status, bool $reset = false);
77 77
 
78 78
 
79
-	/**
80
-	 * Update the status of an array of Index. status is a bit flag, setting $reset to
81
-	 * true will reset the status to the value defined in the parameter.
82
-	 *
83
-	 * @since 15.0.0
84
-	 *
85
-	 * @param string $providerId
86
-	 * @param array $documentIds
87
-	 * @param int $status
88
-	 * @param bool $reset
89
-	 */
90
-	public function updateIndexesStatus(string $providerId, array $documentIds, int $status, bool $reset = false);
79
+    /**
80
+     * Update the status of an array of Index. status is a bit flag, setting $reset to
81
+     * true will reset the status to the value defined in the parameter.
82
+     *
83
+     * @since 15.0.0
84
+     *
85
+     * @param string $providerId
86
+     * @param array $documentIds
87
+     * @param int $status
88
+     * @param bool $reset
89
+     */
90
+    public function updateIndexesStatus(string $providerId, array $documentIds, int $status, bool $reset = false);
91 91
 
92 92
 
93
-	/**
94
-	 * Update an array of Index.
95
-	 *
96
-	 * @since 15.0.0
97
-	 *
98
-	 * @param array $indexes
99
-	 */
100
-	public function updateIndexes(array $indexes);
93
+    /**
94
+     * Update an array of Index.
95
+     *
96
+     * @since 15.0.0
97
+     *
98
+     * @param array $indexes
99
+     */
100
+    public function updateIndexes(array $indexes);
101 101
 }
Please login to merge, or discard this patch.
lib/public/FullTextSearch/Service/ISearchService.php 1 patch
Indentation   +37 added lines, -37 removed lines patch added patch discarded remove patch
@@ -35,43 +35,43 @@
 block discarded – undo
35 35
  *
36 36
  */
37 37
 interface ISearchService {
38
-	/**
39
-	 * generate a search request, based on an array:
40
-	 *
41
-	 * $request =
42
-	 *   [
43
-	 *        'providers' =>    (string/array) 'all'
44
-	 *        'author' =>       (string) owner of the document.
45
-	 *        'search' =>       (string) search string,
46
-	 *        'size' =>         (int) number of items to be return
47
-	 *        'page' =>         (int) page
48
-	 *        'parts' =>        (array) parts of document to search within,
49
-	 *        'options' =       (array) search options,
50
-	 *        'tags'     =>     (array) tags,
51
-	 *        'metatags' =>     (array) metatags,
52
-	 *        'subtags'  =>     (array) subtags
53
-	 *   ]
54
-	 *
55
-	 * 'providers' can be an array of providerIds
56
-	 *
57
-	 * @since 15.0.0
58
-	 *
59
-	 * @param array $request
60
-	 *
61
-	 * @return ISearchRequest
62
-	 */
63
-	public function generateSearchRequest(array $request): ISearchRequest;
38
+    /**
39
+     * generate a search request, based on an array:
40
+     *
41
+     * $request =
42
+     *   [
43
+     *        'providers' =>    (string/array) 'all'
44
+     *        'author' =>       (string) owner of the document.
45
+     *        'search' =>       (string) search string,
46
+     *        'size' =>         (int) number of items to be return
47
+     *        'page' =>         (int) page
48
+     *        'parts' =>        (array) parts of document to search within,
49
+     *        'options' =       (array) search options,
50
+     *        'tags'     =>     (array) tags,
51
+     *        'metatags' =>     (array) metatags,
52
+     *        'subtags'  =>     (array) subtags
53
+     *   ]
54
+     *
55
+     * 'providers' can be an array of providerIds
56
+     *
57
+     * @since 15.0.0
58
+     *
59
+     * @param array $request
60
+     *
61
+     * @return ISearchRequest
62
+     */
63
+    public function generateSearchRequest(array $request): ISearchRequest;
64 64
 
65 65
 
66
-	/**
67
-	 * Search documents
68
-	 *
69
-	 * @since 15.0.0
70
-	 *
71
-	 * @param string $userId
72
-	 * @param ISearchRequest $searchRequest
73
-	 *
74
-	 * @return ISearchResult[]
75
-	 */
76
-	public function search(string $userId, ISearchRequest $searchRequest): array;
66
+    /**
67
+     * Search documents
68
+     *
69
+     * @since 15.0.0
70
+     *
71
+     * @param string $userId
72
+     * @param ISearchRequest $searchRequest
73
+     *
74
+     * @return ISearchResult[]
75
+     */
76
+    public function search(string $userId, ISearchRequest $searchRequest): array;
77 77
 }
Please login to merge, or discard this patch.
lib/public/FullTextSearch/Model/IIndexOptions.php 1 patch
Indentation   +33 added lines, -33 removed lines patch added patch discarded remove patch
@@ -37,39 +37,39 @@
 block discarded – undo
37 37
  *
38 38
  */
39 39
 interface IIndexOptions {
40
-	/**
41
-	 * Get the value (as a string) for an option.
42
-	 *
43
-	 * @since 15.0.0
44
-	 *
45
-	 * @param string $option
46
-	 * @param string $default
47
-	 *
48
-	 * @return string
49
-	 */
50
-	public function getOption(string $option, string $default = ''): string;
40
+    /**
41
+     * Get the value (as a string) for an option.
42
+     *
43
+     * @since 15.0.0
44
+     *
45
+     * @param string $option
46
+     * @param string $default
47
+     *
48
+     * @return string
49
+     */
50
+    public function getOption(string $option, string $default = ''): string;
51 51
 
52
-	/**
53
-	 * Get the value (as an array) for an option.
54
-	 *
55
-	 * @since 15.0.0
56
-	 *
57
-	 * @param string $option
58
-	 * @param array $default
59
-	 *
60
-	 * @return array
61
-	 */
62
-	public function getOptionArray(string $option, array $default = []): array;
52
+    /**
53
+     * Get the value (as an array) for an option.
54
+     *
55
+     * @since 15.0.0
56
+     *
57
+     * @param string $option
58
+     * @param array $default
59
+     *
60
+     * @return array
61
+     */
62
+    public function getOptionArray(string $option, array $default = []): array;
63 63
 
64
-	/**
65
-	 * Get the value (as an boolean) for an option.
66
-	 *
67
-	 * @since 15.0.0
68
-	 *
69
-	 * @param string $option
70
-	 * @param bool $default
71
-	 *
72
-	 * @return bool
73
-	 */
74
-	public function getOptionBool(string $option, bool $default): bool;
64
+    /**
65
+     * Get the value (as an boolean) for an option.
66
+     *
67
+     * @since 15.0.0
68
+     *
69
+     * @param string $option
70
+     * @param bool $default
71
+     *
72
+     * @return bool
73
+     */
74
+    public function getOptionBool(string $option, bool $default): bool;
75 75
 }
Please login to merge, or discard this patch.
lib/public/FullTextSearch/Model/ISearchOption.php 1 patch
Indentation   +126 added lines, -126 removed lines patch added patch discarded remove patch
@@ -33,130 +33,130 @@
 block discarded – undo
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
 }
Please login to merge, or discard this patch.
lib/public/FullTextSearch/Model/ISearchRequest.php 1 patch
Indentation   +311 added lines, -311 removed lines patch added patch discarded remove patch
@@ -43,315 +43,315 @@
 block discarded – undo
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
 }
Please login to merge, or discard this patch.
lib/public/FullTextSearch/Model/ISearchResult.php 1 patch
Indentation   +137 added lines, -137 removed lines patch added patch discarded remove patch
@@ -46,141 +46,141 @@
 block discarded – undo
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
 }
Please login to merge, or discard this patch.
lib/public/FullTextSearch/Model/ISearchTemplate.php 1 patch
Indentation   +112 added lines, -112 removed lines patch added patch discarded remove patch
@@ -52,116 +52,116 @@
 block discarded – undo
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
 }
Please login to merge, or discard this patch.