Static Public Member Functions | |
static | titleSearch ($search, $limit, $namespaces=array()) |
Do a prefix search of titles and return a list of matching page names. | |
Static Protected Member Functions | |
static | searchBackend ($namespaces, $search, $limit) |
Do a prefix search of titles and return a list of matching page names. | |
static | specialSearch ($search, $limit) |
Prefix search special-case for Special: namespace. | |
static | defaultSearchBackend ($namespaces, $search, $limit) |
Unless overridden by PrefixSearchBackend hook. | |
static | validateNamespaces ($namespaces) |
Validate an array of numerical namespace indexes. |
Used largely by the OpenSearch implementation.
Definition at line 10 of file PrefixSearch.php.
static PrefixSearch::defaultSearchBackend | ( | $ | namespaces, | |
$ | search, | |||
$ | limit | |||
) | [static, protected] |
Unless overridden by PrefixSearchBackend hook.
.. This is case-sensitive (First character may be automatically capitalized by Title::secureAndSpit() later on depending on $wgCapitalLinks)
$namespaces | Array: namespaces to search in | |
$search | String: term | |
$limit | Integer: max number of items to return |
Definition at line 123 of file PrefixSearch.php.
Referenced by searchBackend().
static PrefixSearch::searchBackend | ( | $ | namespaces, | |
$ | search, | |||
$ | limit | |||
) | [static, protected] |
Do a prefix search of titles and return a list of matching page names.
$namespaces | Array | |
$search | String | |
$limit | Integer |
Definition at line 55 of file PrefixSearch.php.
References defaultSearchBackend(), specialSearch(), and wfRunHooks().
Referenced by titleSearch().
static PrefixSearch::specialSearch | ( | $ | search, | |
$ | limit | |||
) | [static, protected] |
Prefix search special-case for Special: namespace.
$search | String: term | |
$limit | Integer: max number of items to return |
Definition at line 78 of file PrefixSearch.php.
References $keys, SpecialPage::$mList, $page, $wgContLang, SpecialPage::initAliasList(), SpecialPage::initList(), and Title::makeTitle().
Referenced by searchBackend().
static PrefixSearch::titleSearch | ( | $ | search, | |
$ | limit, | |||
$ | namespaces = array() | |||
) | [static] |
Do a prefix search of titles and return a list of matching page names.
$search | String | |
$limit | Integer | |
$namespaces | Array: used if query is not explicitely prefixed |
Definition at line 19 of file PrefixSearch.php.
References $title, Title::newFromText(), searchBackend(), and validateNamespaces().
Referenced by ApiOpenSearch::execute().
static PrefixSearch::validateNamespaces | ( | $ | namespaces | ) | [static, protected] |
Validate an array of numerical namespace indexes.
$namespaces | Array |
Definition at line 161 of file PrefixSearch.php.
References $wgContLang.
Referenced by titleSearch().