MediaWiki  master
SearchNearMatchResultSet.php
Go to the documentation of this file.
1 <?php
2 
4 
12  public function __construct( $match ) {
13  if ( $match === null ) {
14  $this->results = [];
15  } else {
16  $this->results = [ SearchResult::newFromTitle( $match, $this ) ];
17  }
18  }
19 
20  public function numRows() {
21  return $this->results ? 1 : 0;
22  }
23 }
Represents a title within MediaWiki.
Definition: Title.php:76
A ISearchResultSet wrapper for TitleMatcher.
static newFromTitle( $title, ISearchResultSet $parentSet=null)
Return a new SearchResult and initializes it with a title.