3 * A SearchResultSet wrapper for SearchEngine::getNearMatch
5 class SearchNearMatchResultSet
extends SearchResultSet
{
6 private $fetched = false;
9 * @param Title|null $match Title if matched, else null
11 public function __construct( $match ) {
12 $this->result
= $match;
15 public function numRows() {
16 return $this->result ?
1 : 0;
19 public function next() {
20 if ( $this->fetched ||
!$this->result
) {
23 $this->fetched
= true;
24 return SearchResult
::newFromTitle( $this->result
);