MediaWiki  1.34.0
TitlePrefixSearch.php
Go to the documentation of this file.
1 <?php
29 
30  protected function titles( array $titles ) {
31  return $titles;
32  }
33 
34  protected function strings( array $strings ) {
35  $titles = array_map( 'Title::newFromText', $strings );
36  $lb = new LinkBatch( $titles );
37  $lb->setCaller( __METHOD__ );
38  $lb->execute();
39  return $titles;
40  }
41 }
LinkBatch
Class representing a list of titles The execute() method checks them all for existence and adds them ...
Definition: LinkBatch.php:34
TitlePrefixSearch
Performs prefix search, returning Title objects.
Definition: TitlePrefixSearch.php:28
TitlePrefixSearch\strings
strings(array $strings)
When implemented in a descendant class, receives an array of titles as strings and returns either an ...
Definition: TitlePrefixSearch.php:34
TitlePrefixSearch\titles
titles(array $titles)
When implemented in a descendant class, receives an array of Title objects and returns either an unmo...
Definition: TitlePrefixSearch.php:30
PrefixSearch
Handles searching prefixes of titles and finding any page names that match.
Definition: PrefixSearch.php:32