Debian Codegraph @

includes/search/Hook/PrefixSearchBackendHook.php

raw symbols SCIP
1 <?php
2
3 namespace MediaWiki\Search\Hook;
4
5 /**
6 * This is a hook handler interface, see docs/Hooks.md.
7 * Use the hook name "PrefixSearchBackend" to register handlers implementing this interface.
8 *
9 * @deprecated since 1.27. Override SearchEngine::completionSearchBackend instead. Emitting warnings since 1.41.
10 * @ingroup Hooks
11 */
12 interface PrefixSearchBackendHook {
13 /**
14 * Use this hook to override the title prefix search used for OpenSearch and
15 * AJAX search suggestions. Put results into &$results outparam and return false.
16 *
17 * @since 1.35
18 *
19 * @param int[] $ns Array of int namespace keys to search in
20 * @param string $search Search term (not guaranteed to be conveniently normalized)
21 * @param int $limit Maximum number of results to return
22 * @param string[] &$results Out param: array of page names
23 * @param int $offset Number of results to offset from the beginning
24 * @return bool|void True or no return value to continue or false to abort
25 */
26 public function onPrefixSearchBackend( $ns, $search, $limit, &$results,
27 $offset
28 );
29 }