MediaWiki
REL1_31
SearchNearMatchResultSet.php
Go to the documentation of this file.
1
<?php
5
class
SearchNearMatchResultSet
extends
SearchResultSet
{
6
private
$fetched
=
false
;
7
11
public
function
__construct
( $match ) {
12
$this->result = $match;
13
}
14
15
public
function
numRows
() {
16
return
$this->result ? 1 : 0;
17
}
18
19
public
function
next
() {
20
if
( $this->fetched || !$this->result ) {
21
return
false
;
22
}
23
$this->fetched =
true
;
24
return
SearchResult::newFromTitle( $this->result, $this );
25
}
26
27
public
function
rewind
() {
28
$this->fetched =
false
;
29
}
30
}
SearchNearMatchResultSet
A SearchResultSet wrapper for SearchNearMatcher.
Definition
SearchNearMatchResultSet.php:5
SearchNearMatchResultSet\rewind
rewind()
Rewind result set back to beginning.
Definition
SearchNearMatchResultSet.php:27
SearchNearMatchResultSet\$fetched
$fetched
Definition
SearchNearMatchResultSet.php:6
SearchNearMatchResultSet\numRows
numRows()
Definition
SearchNearMatchResultSet.php:15
SearchNearMatchResultSet\next
next()
Fetches next search result, or false.
Definition
SearchNearMatchResultSet.php:19
SearchNearMatchResultSet\__construct
__construct( $match)
Definition
SearchNearMatchResultSet.php:11
SearchResultSet
Definition
SearchResultSet.php:27
includes
search
SearchNearMatchResultSet.php
Generated on Mon Nov 25 2024 15:35:18 for MediaWiki by
1.10.0