MediaWiki  master
TitlePrefixSearch.php
Go to the documentation of this file.
1 <?php
24 
31 
36  protected function titles( array $titles ) {
37  return $titles;
38  }
39 
44  protected function strings( array $strings ) {
45  $titles = array_map( 'Title::newFromText', $strings );
46  $linkBatchFactory = MediaWikiServices::getInstance()->getLinkBatchFactory();
47  $lb = $linkBatchFactory->newLinkBatch( $titles );
48  $lb->setCaller( __METHOD__ );
49  $lb->execute();
50  return $titles;
51  }
52 }
MediaWiki\MediaWikiServices
MediaWikiServices is the service locator for the application scope of MediaWiki.
Definition: MediaWikiServices.php:165
TitlePrefixSearch
Performs prefix search, returning Title objects.
Definition: TitlePrefixSearch.php:30
TitlePrefixSearch\strings
strings(array $strings)
Definition: TitlePrefixSearch.php:44
TitlePrefixSearch\titles
titles(array $titles)
Definition: TitlePrefixSearch.php:36
PrefixSearch
Handles searching prefixes of titles and finding any page names that match.
Definition: PrefixSearch.php:33