Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | n/a |
0 / 0 |
n/a |
0 / 0 |
CRAP | n/a |
0 / 0 |
1 | <?php |
2 | |
3 | namespace CirrusSearch\Parser; |
4 | |
5 | use CirrusSearch\SearchConfig; |
6 | |
7 | /** |
8 | * Repository of query classifiers |
9 | */ |
10 | interface ParsedQueryClassifiersRepository { |
11 | /** |
12 | * @param ParsedQueryClassifier $classifier |
13 | * @throws ParsedQueryClassifierException |
14 | */ |
15 | public function registerClassifier( ParsedQueryClassifier $classifier ); |
16 | |
17 | /** |
18 | * @param string[] $classes list of classes that this classifier can produce |
19 | * @param callable $callable called as ParsedQueryClassifier::classify( ParsedQuery $query ) |
20 | * @throws ParsedQueryClassifierException |
21 | * @see ParsedQueryClassifier::classify() |
22 | */ |
23 | public function registerClassifierAsCallable( array $classes, callable $callable ); |
24 | |
25 | /** |
26 | * The host wiki SearchConfig |
27 | * @return SearchConfig |
28 | */ |
29 | public function getConfig(); |
30 | |
31 | /** |
32 | * @param string $name |
33 | * @return ParsedQueryClassifier |
34 | */ |
35 | public function getClassifier( $name ); |
36 | |
37 | /** |
38 | * List known classifiers |
39 | * @return string[] |
40 | */ |
41 | public function getKnownClassifiers(); |
42 | } |