Passed
Push — master ( b73ef3...79eb5d )
by Roeland
10:23
created
lib/public/FullTextSearch/Model/ISearchRequest.php 1 patch
Indentation   +311 added lines, -311 removed lines patch added patch discarded remove patch
@@ -52,317 +52,317 @@
 block discarded – undo
52 52
 interface ISearchRequest {
53 53
 
54 54
 
55
-	/**
56
-	 * Get the maximum number of results to be returns by the Search Platform.
57
-	 *
58
-	 * @since 15.0.0
59
-	 *
60
-	 * @return int
61
-	 */
62
-	public function getSize(): int;
63
-
64
-
65
-	/**
66
-	 * Get the current page.
67
-	 * Used by pagination.
68
-	 *
69
-	 * @since 15.0.0
70
-	 *
71
-	 * @return int
72
-	 */
73
-	public function getPage(): int;
74
-
75
-
76
-	/**
77
-	 * Get the author of the request.
78
-	 *
79
-	 * @since 15.0.0
80
-	 *
81
-	 * @return string
82
-	 */
83
-	public function getAuthor(): string;
84
-
85
-	/**
86
-	 * Get the searched string.
87
-	 *
88
-	 * @since 15.0.0
89
-	 *
90
-	 * @return string
91
-	 */
92
-	public function getSearch(): string;
93
-
94
-	/**
95
-	 * Set the searched string.
96
-	 *
97
-	 * @param string $search
98
-	 *
99
-	 * @since 17.0.0
100
-	 *
101
-	 * @return ISearchRequest
102
-	 */
103
-	public function setSearch(string $search): ISearchRequest;
104
-
105
-	/**
106
-	 * Extends the searched string.
107
-	 *
108
-	 * @since 17.0.0
109
-	 *
110
-	 * @param string $search
111
-	 *
112
-	 * @return ISearchRequest
113
-	 */
114
-	public function addSearch(string $search): ISearchRequest;
115
-
116
-
117
-	/**
118
-	 * Get the value of an option (as string).
119
-	 *
120
-	 * @since 15.0.0
121
-	 *
122
-	 * @param string $option
123
-	 * @param string $default
124
-	 *
125
-	 * @return string
126
-	 */
127
-	public function getOption(string $option, string $default = ''): string;
128
-
129
-	/**
130
-	 * Get the value of an option (as array).
131
-	 *
132
-	 * @since 15.0.0
133
-	 *
134
-	 * @param string $option
135
-	 * @param array $default
136
-	 *
137
-	 * @return array
138
-	 */
139
-	public function getOptionArray(string $option, array $default = []): array;
140
-
141
-
142
-	/**
143
-	 * Limit the search to a part of the document.
144
-	 *
145
-	 * @since 15.0.0
146
-	 *
147
-	 * @param string $part
148
-	 *
149
-	 * @return ISearchRequest
150
-	 */
151
-	public function addPart(string $part): ISearchRequest;
152
-
153
-	/**
154
-	 * Limit the search to an array of parts of the document.
155
-	 *
156
-	 * @since 15.0.0
157
-	 *
158
-	 * @param array $parts
159
-	 *
160
-	 * @return ISearchRequest
161
-	 */
162
-	public function setParts(array $parts): ISearchRequest;
163
-
164
-	/**
165
-	 * Get the parts the search is limited to.
166
-	 *
167
-	 * @since 15.0.0
168
-	 *
169
-	 * @return array
170
-	 */
171
-	public function getParts(): array;
172
-
173
-
174
-	/**
175
-	 * Limit the search to a specific meta tag.
176
-	 *
177
-	 * @since 15.0.0
178
-	 *
179
-	 * @param string $tag
180
-	 *
181
-	 * @return ISearchRequest
182
-	 */
183
-	public function addMetaTag(string $tag): ISearchRequest;
184
-
185
-	/**
186
-	 * Get the meta tags the search is limited to.
187
-	 *
188
-	 * @since 15.0.0
189
-	 *
190
-	 * @return array
191
-	 */
192
-	public function getMetaTags(): array;
193
-
194
-	/**
195
-	 * Limit the search to an array of meta tags.
196
-	 *
197
-	 * @since 15.0.0
198
-	 *
199
-	 * @param array $tags
200
-	 *
201
-	 * @return ISearchRequest
202
-	 */
203
-	public function setMetaTags(array $tags): IsearchRequest;
204
-
205
-
206
-	/**
207
-	 * Limit the search to a specific sub tag.
208
-	 *
209
-	 * @since 15.0.0
210
-	 *
211
-	 * @param string $source
212
-	 * @param string $tag
213
-	 *
214
-	 * @return ISearchRequest
215
-	 */
216
-	public function addSubTag(string $source, string $tag): ISearchRequest;
217
-
218
-	/**
219
-	 * Get the sub tags the search is limited to.
220
-	 *
221
-	 * @since 15.0.0
222
-	 *
223
-	 * @param bool $formatted
224
-	 *
225
-	 * @return array
226
-	 */
227
-	public function getSubTags(bool $formatted): array;
228
-
229
-	/**
230
-	 * Limit the search to an array of sub tags.
231
-	 *
232
-	 * @since 15.0.0
233
-	 *
234
-	 * @param array $tags
235
-	 *
236
-	 * @return ISearchRequest
237
-	 */
238
-	public function setSubTags(array $tags): ISearchRequest;
239
-
240
-
241
-	/**
242
-	 * Limit the search to a specific field of the mapping, using a full string.
243
-	 *
244
-	 * @since 15.0.0
245
-	 *
246
-	 * @param string $field
247
-	 *
248
-	 * @return ISearchRequest
249
-	 */
250
-	public function addLimitField(string $field): ISearchRequest;
251
-
252
-	/**
253
-	 * Get the fields the search is limited to.
254
-	 *
255
-	 * @since 15.0.0
256
-	 *
257
-	 * @return array
258
-	 */
259
-	public function getLimitFields(): array;
260
-
261
-
262
-	/**
263
-	 * Limit the search to a specific field of the mapping, using a wildcard on
264
-	 * the search string.
265
-	 *
266
-	 * @since 15.0.0
267
-	 *
268
-	 * @param string $field
269
-	 *
270
-	 * @return ISearchRequest
271
-	 */
272
-	public function addWildcardField(string $field): ISearchRequest;
273
-
274
-	/**
275
-	 * Get the limit to field of the mapping.
276
-	 *
277
-	 * @since 15.0.0
278
-	 *
279
-	 * @return array
280
-	 */
281
-	public function getWildcardFields(): array;
282
-
283
-
284
-	/**
285
-	 * Filter the results, based on a group of field, using regex
286
-	 *
287
-	 * @since 15.0.0
288
-	 *
289
-	 * @param array $filters
290
-	 *
291
-	 * @return ISearchRequest
292
-	 */
293
-	public function addRegexFilters(array $filters): ISearchRequest;
294
-
295
-	/**
296
-	 * Get the regex filters the search is limit to.
297
-	 *
298
-	 * @since 15.0.0
299
-	 *
300
-	 * @return array
301
-	 */
302
-	public function getRegexFilters(): array;
303
-
304
-
305
-	/**
306
-	 * Filter the results, based on a group of field, using wildcard
307
-	 *
308
-	 * @since 15.0.0
309
-	 *
310
-	 * @param array $filter
311
-	 *
312
-	 * @return ISearchRequest
313
-	 */
314
-	public function addWildcardFilter(array $filter): ISearchRequest;
315
-
316
-	/**
317
-	 * Get the wildcard filters the search is limit to.
318
-	 *
319
-	 * @since 15.0.0
320
-	 *
321
-	 * @return array
322
-	 */
323
-	public function getWildcardFilters(): array;
324
-
325
-
326
-	/**
327
-	 * Add an extra field to the search.
328
-	 *
329
-	 * @since 15.0.0
330
-	 *
331
-	 * @param string $field
332
-	 *
333
-	 * @return ISearchRequest
334
-	 */
335
-	public function addField(string $field): ISearchRequest;
336
-
337
-	/**
338
-	 * Get the list of extra field to search into.
339
-	 *
340
-	 * @since 15.0.0
341
-	 *
342
-	 * @return array
343
-	 */
344
-	public function getFields(): array;
345
-
346
-
347
-
348
-	/**
349
-	 * Add a MUST search on an extra field
350
-	 *
351
-	 * @param ISearchRequestSimpleQuery $query
352
-	 *
353
-	 * @return ISearchRequest
354
-	 * @since 17.0.0
355
-	 */
356
-	public function addSimpleQuery(ISearchRequestSimpleQuery $query): ISearchRequest;
357
-
358
-
359
-	/**
360
-	 * Get the list of queries on extra field.
361
-	 *
362
-	 * @return ISearchRequestSimpleQuery[]
363
-	 * @since 17.0.0
364
-	 */
365
-	public function getSimpleQueries(): array;
55
+    /**
56
+     * Get the maximum number of results to be returns by the Search Platform.
57
+     *
58
+     * @since 15.0.0
59
+     *
60
+     * @return int
61
+     */
62
+    public function getSize(): int;
63
+
64
+
65
+    /**
66
+     * Get the current page.
67
+     * Used by pagination.
68
+     *
69
+     * @since 15.0.0
70
+     *
71
+     * @return int
72
+     */
73
+    public function getPage(): int;
74
+
75
+
76
+    /**
77
+     * Get the author of the request.
78
+     *
79
+     * @since 15.0.0
80
+     *
81
+     * @return string
82
+     */
83
+    public function getAuthor(): string;
84
+
85
+    /**
86
+     * Get the searched string.
87
+     *
88
+     * @since 15.0.0
89
+     *
90
+     * @return string
91
+     */
92
+    public function getSearch(): string;
93
+
94
+    /**
95
+     * Set the searched string.
96
+     *
97
+     * @param string $search
98
+     *
99
+     * @since 17.0.0
100
+     *
101
+     * @return ISearchRequest
102
+     */
103
+    public function setSearch(string $search): ISearchRequest;
104
+
105
+    /**
106
+     * Extends the searched string.
107
+     *
108
+     * @since 17.0.0
109
+     *
110
+     * @param string $search
111
+     *
112
+     * @return ISearchRequest
113
+     */
114
+    public function addSearch(string $search): ISearchRequest;
115
+
116
+
117
+    /**
118
+     * Get the value of an option (as string).
119
+     *
120
+     * @since 15.0.0
121
+     *
122
+     * @param string $option
123
+     * @param string $default
124
+     *
125
+     * @return string
126
+     */
127
+    public function getOption(string $option, string $default = ''): string;
128
+
129
+    /**
130
+     * Get the value of an option (as array).
131
+     *
132
+     * @since 15.0.0
133
+     *
134
+     * @param string $option
135
+     * @param array $default
136
+     *
137
+     * @return array
138
+     */
139
+    public function getOptionArray(string $option, array $default = []): array;
140
+
141
+
142
+    /**
143
+     * Limit the search to a part of the document.
144
+     *
145
+     * @since 15.0.0
146
+     *
147
+     * @param string $part
148
+     *
149
+     * @return ISearchRequest
150
+     */
151
+    public function addPart(string $part): ISearchRequest;
152
+
153
+    /**
154
+     * Limit the search to an array of parts of the document.
155
+     *
156
+     * @since 15.0.0
157
+     *
158
+     * @param array $parts
159
+     *
160
+     * @return ISearchRequest
161
+     */
162
+    public function setParts(array $parts): ISearchRequest;
163
+
164
+    /**
165
+     * Get the parts the search is limited to.
166
+     *
167
+     * @since 15.0.0
168
+     *
169
+     * @return array
170
+     */
171
+    public function getParts(): array;
172
+
173
+
174
+    /**
175
+     * Limit the search to a specific meta tag.
176
+     *
177
+     * @since 15.0.0
178
+     *
179
+     * @param string $tag
180
+     *
181
+     * @return ISearchRequest
182
+     */
183
+    public function addMetaTag(string $tag): ISearchRequest;
184
+
185
+    /**
186
+     * Get the meta tags the search is limited to.
187
+     *
188
+     * @since 15.0.0
189
+     *
190
+     * @return array
191
+     */
192
+    public function getMetaTags(): array;
193
+
194
+    /**
195
+     * Limit the search to an array of meta tags.
196
+     *
197
+     * @since 15.0.0
198
+     *
199
+     * @param array $tags
200
+     *
201
+     * @return ISearchRequest
202
+     */
203
+    public function setMetaTags(array $tags): IsearchRequest;
204
+
205
+
206
+    /**
207
+     * Limit the search to a specific sub tag.
208
+     *
209
+     * @since 15.0.0
210
+     *
211
+     * @param string $source
212
+     * @param string $tag
213
+     *
214
+     * @return ISearchRequest
215
+     */
216
+    public function addSubTag(string $source, string $tag): ISearchRequest;
217
+
218
+    /**
219
+     * Get the sub tags the search is limited to.
220
+     *
221
+     * @since 15.0.0
222
+     *
223
+     * @param bool $formatted
224
+     *
225
+     * @return array
226
+     */
227
+    public function getSubTags(bool $formatted): array;
228
+
229
+    /**
230
+     * Limit the search to an array of sub tags.
231
+     *
232
+     * @since 15.0.0
233
+     *
234
+     * @param array $tags
235
+     *
236
+     * @return ISearchRequest
237
+     */
238
+    public function setSubTags(array $tags): ISearchRequest;
239
+
240
+
241
+    /**
242
+     * Limit the search to a specific field of the mapping, using a full string.
243
+     *
244
+     * @since 15.0.0
245
+     *
246
+     * @param string $field
247
+     *
248
+     * @return ISearchRequest
249
+     */
250
+    public function addLimitField(string $field): ISearchRequest;
251
+
252
+    /**
253
+     * Get the fields the search is limited to.
254
+     *
255
+     * @since 15.0.0
256
+     *
257
+     * @return array
258
+     */
259
+    public function getLimitFields(): array;
260
+
261
+
262
+    /**
263
+     * Limit the search to a specific field of the mapping, using a wildcard on
264
+     * the search string.
265
+     *
266
+     * @since 15.0.0
267
+     *
268
+     * @param string $field
269
+     *
270
+     * @return ISearchRequest
271
+     */
272
+    public function addWildcardField(string $field): ISearchRequest;
273
+
274
+    /**
275
+     * Get the limit to field of the mapping.
276
+     *
277
+     * @since 15.0.0
278
+     *
279
+     * @return array
280
+     */
281
+    public function getWildcardFields(): array;
282
+
283
+
284
+    /**
285
+     * Filter the results, based on a group of field, using regex
286
+     *
287
+     * @since 15.0.0
288
+     *
289
+     * @param array $filters
290
+     *
291
+     * @return ISearchRequest
292
+     */
293
+    public function addRegexFilters(array $filters): ISearchRequest;
294
+
295
+    /**
296
+     * Get the regex filters the search is limit to.
297
+     *
298
+     * @since 15.0.0
299
+     *
300
+     * @return array
301
+     */
302
+    public function getRegexFilters(): array;
303
+
304
+
305
+    /**
306
+     * Filter the results, based on a group of field, using wildcard
307
+     *
308
+     * @since 15.0.0
309
+     *
310
+     * @param array $filter
311
+     *
312
+     * @return ISearchRequest
313
+     */
314
+    public function addWildcardFilter(array $filter): ISearchRequest;
315
+
316
+    /**
317
+     * Get the wildcard filters the search is limit to.
318
+     *
319
+     * @since 15.0.0
320
+     *
321
+     * @return array
322
+     */
323
+    public function getWildcardFilters(): array;
324
+
325
+
326
+    /**
327
+     * Add an extra field to the search.
328
+     *
329
+     * @since 15.0.0
330
+     *
331
+     * @param string $field
332
+     *
333
+     * @return ISearchRequest
334
+     */
335
+    public function addField(string $field): ISearchRequest;
336
+
337
+    /**
338
+     * Get the list of extra field to search into.
339
+     *
340
+     * @since 15.0.0
341
+     *
342
+     * @return array
343
+     */
344
+    public function getFields(): array;
345
+
346
+
347
+
348
+    /**
349
+     * Add a MUST search on an extra field
350
+     *
351
+     * @param ISearchRequestSimpleQuery $query
352
+     *
353
+     * @return ISearchRequest
354
+     * @since 17.0.0
355
+     */
356
+    public function addSimpleQuery(ISearchRequestSimpleQuery $query): ISearchRequest;
357
+
358
+
359
+    /**
360
+     * Get the list of queries on extra field.
361
+     *
362
+     * @return ISearchRequestSimpleQuery[]
363
+     * @since 17.0.0
364
+     */
365
+    public function getSimpleQueries(): array;
366 366
 
367 367
 }
368 368
 
Please login to merge, or discard this patch.