| Current Path : /var/www/html/mediawiki-1.43.1/includes/search/ |
| Current File : /var/www/html/mediawiki-1.43.1/includes/search/SearchNearMatchResultSet.php |
<?php
use MediaWiki\Title\Title;
/**
* A ISearchResultSet wrapper for TitleMatcher
*/
class SearchNearMatchResultSet extends SearchResultSet {
/**
* @param Title|null $match Title if matched, else null
*/
public function __construct( $match ) {
if ( $match === null ) {
$this->results = [];
} else {
$this->results = [ SearchResult::newFromTitle( $match, $this ) ];
}
}
public function numRows() {
return $this->results ? 1 : 0;
}
}