Localisation updates from https://translatewiki.net.
[mediawiki.git] / includes / search / SearchNearMatchResultSet.php
blobbe6c9c1796d838286a9c9f09cfb8c0c8f568b816
1 <?php
3 use MediaWiki\Title\Title;
5 /**
6 * A ISearchResultSet wrapper for TitleMatcher
7 */
8 class SearchNearMatchResultSet extends SearchResultSet {
9 /**
10 * @param Title|null $match Title if matched, else null
12 public function __construct( $match ) {
13 if ( $match === null ) {
14 $this->results = [];
15 } else {
16 $this->results = [ SearchResult::newFromTitle( $match, $this ) ];
20 public function numRows() {
21 return $this->results ? 1 : 0;