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\Profile; |
4 | |
5 | /** |
6 | * Override the default profile. |
7 | */ |
8 | interface SearchProfileOverride { |
9 | /** |
10 | * Default priority for uri param overrides |
11 | */ |
12 | public const URI_PARAM_PRIO = 100; |
13 | |
14 | /** |
15 | * Default priority for user pref overrides |
16 | */ |
17 | public const USER_PREF_PRIO = 200; |
18 | |
19 | /** |
20 | * Default priority for contextual overrides |
21 | */ |
22 | public const CONTEXTUAL_PRIO = 300; |
23 | |
24 | /** |
25 | * Default priority for config overrides |
26 | */ |
27 | public const CONFIG_PRIO = 400; |
28 | |
29 | /** |
30 | * Get the overridden name or null if it cannot be overridden. |
31 | * @param string[] $contextParams Arbitrary parameters describing the context |
32 | * provided by the profile requestor. |
33 | * @return string|null |
34 | */ |
35 | public function getOverriddenName( array $contextParams ); |
36 | |
37 | /** |
38 | * The priority of this override, lower wins |
39 | * @return int |
40 | */ |
41 | public function priority(); |
42 | |
43 | /** |
44 | * Returns some explanation of the features stored in this overrider. |
45 | * @return array the explanation (must only contains primitives types arrays/numbers/strings |
46 | * so that it's easily serializable) |
47 | */ |
48 | public function explain(): array; |
49 | } |