MediaWiki master
TitlePrefixSearch.php
Go to the documentation of this file.
1<?php
9namespace MediaWiki\Search;
10
13
20
25 protected function titles( array $titles ) {
26 return $titles;
27 }
28
33 protected function strings( array $strings ) {
34 $titles = array_map( Title::newFromText( ... ), $strings );
35 $linkBatchFactory = MediaWikiServices::getInstance()->getLinkBatchFactory();
36 $linkBatchFactory->newLinkBatch( $titles )
37 ->setCaller( __METHOD__ )
38 ->execute();
39 return $titles;
40 }
41}
42
44class_alias( TitlePrefixSearch::class, 'TitlePrefixSearch' );
Service locator for MediaWiki core services.
static getInstance()
Returns the global default instance of the top level service locator.
Handles searching prefixes of titles and finding any page names that match.
Performs prefix search, returning Title objects.
Represents a title within MediaWiki.
Definition Title.php:69
Definition of a mapping for the search index field.