MediaWiki master
TitlePrefixSearch.php
Go to the documentation of this file.
1<?php
25
32
37 protected function titles( array $titles ) {
38 return $titles;
39 }
40
45 protected function strings( array $strings ) {
46 $titles = array_map( [ Title::class, 'newFromText' ], $strings );
47 $linkBatchFactory = MediaWikiServices::getInstance()->getLinkBatchFactory();
48 $lb = $linkBatchFactory->newLinkBatch( $titles );
49 $lb->setCaller( __METHOD__ );
50 $lb->execute();
51 return $titles;
52 }
53}
Service locator for MediaWiki core services.
Represents a title within MediaWiki.
Definition Title.php:78
Handles searching prefixes of titles and finding any page names that match.
Performs prefix search, returning Title objects.
titles(array $titles)
strings(array $strings)