MediaWiki REL1_37
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::class, 'newFromText' ], $strings );
46 $linkBatchFactory = MediaWikiServices::getInstance()->getLinkBatchFactory();
47 $lb = $linkBatchFactory->newLinkBatch( $titles );
48 $lb->setCaller( __METHOD__ );
49 $lb->execute();
50 return $titles;
51 }
52}
MediaWikiServices is the service locator for the application scope of MediaWiki.
Handles searching prefixes of titles and finding any page names that match.
Performs prefix search, returning Title objects.
titles(array $titles)
strings(array $strings)