MediaWiki REL1_39
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}
Service locator for MediaWiki core services.
Handles searching prefixes of titles and finding any page names that match.
Performs prefix search, returning Title objects.
titles(array $titles)
strings(array $strings)