CirrusSearch
Elasticsearch-powered search for MediaWiki
|
Overrider that generates a name from a template and contextual information from the profile request. More...
Public Member Functions | |
__construct ( $template, array $params, $priority=SearchProfileOverride::CONTEXTUAL_PRIO) | |
priority () | |
The priority of this override, lower wins. | |
getOverriddenName (array $contextParams) | |
Get the overridden name or null if it cannot be overridden. | |
explain () | |
Public Attributes | |
const | LANGUAGE = 'language' |
Language code context, defaults to current context language. | |
Public Attributes inherited from CirrusSearch\Profile\SearchProfileOverride | |
const | URI_PARAM_PRIO = 100 |
Default priority for uri param overrides. | |
const | USER_PREF_PRIO = 200 |
Default priority for user pref overrides. | |
const | CONTEXTUAL_PRIO = 300 |
Default priority for contextual overrides. | |
const | CONFIG_PRIO = 400 |
Default priority for config overrides. | |
Overrider that generates a name from a template and contextual information from the profile request.
Known "context values" are:
CirrusSearch\Profile\ContextualProfileOverride::__construct | ( | $template, | |
array | $params, | ||
$priority = SearchProfileOverride::CONTEXTUAL_PRIO ) |
string | $template | A templated profile name |
string[] | $params | Map from string in $template to context parameter to replace with. All parameters must be available in the context parameters or no override will be applied. |
int | $priority |
CirrusSearch\Profile\ContextualProfileOverride::explain | ( | ) |
Implements CirrusSearch\Profile\SearchProfileOverride.
CirrusSearch\Profile\ContextualProfileOverride::getOverriddenName | ( | array | $contextParams | ) |
Get the overridden name or null if it cannot be overridden.
string[] | $contextParams |
Implements CirrusSearch\Profile\SearchProfileOverride.
CirrusSearch\Profile\ContextualProfileOverride::priority | ( | ) |
The priority of this override, lower wins.
Implements CirrusSearch\Profile\SearchProfileOverride.
const CirrusSearch\Profile\ContextualProfileOverride::LANGUAGE = 'language' |
Language code context, defaults to current context language.