Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
0.00% covered (danger)
0.00%
0 / 4
0.00% covered (danger)
0.00%
0 / 3
CRAP
0.00% covered (danger)
0.00%
0 / 1
BaseSearchResultSet
0.00% covered (danger)
0.00%
0 / 3
0.00% covered (danger)
0.00%
0 / 3
12
0.00% covered (danger)
0.00%
0 / 1
 isApproximateTotalHits
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 termMatches
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 free
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
1<?php
2
3namespace MediaWiki\Search;
4
5/**
6 * BaseSearchResultSet is the base class that must be extended by SearchEngine
7 * search result set implementations.
8 *
9 * This base class is meant to hold B/C behaviors and to be useful it must never:
10 * - be used as type hints (ISearchResultSet must be used for this)
11 * - implement a constructor
12 * - declare utility methods
13 *
14 * @stable to extend
15 * @ingroup Search
16 */
17abstract class BaseSearchResultSet implements ISearchResultSet {
18
19    /**
20     * @inheritDoc
21     */
22    public function isApproximateTotalHits(): bool {
23        return false;
24    }
25
26    /**
27     * Fetch an array of regular expression fragments for matching
28     * the search terms as parsed by this engine in a text extract.
29     * STUB
30     *
31     * @return string[]
32     * @deprecated since 1.34 (use SqlSearchResult)
33     */
34    public function termMatches() {
35        return [];
36    }
37
38    /**
39     * Frees the result set, if applicable.
40     * @deprecated since 1.34; noop
41     */
42    public function free() {
43    }
44}
45/** @deprecated class alias since 1.46 */
46class_alias( BaseSearchResultSet::class, 'BaseSearchResultSet' );