<?php
+
+use Wikimedia\Rdbms\ResultWrapper;
+
/**
* This class is used for different SQL-based search engines shipped with MediaWiki
* @ingroup Search
protected $terms;
protected $totalHits;
- function __construct( $resultSet, $terms, $total = null ) {
+ function __construct( ResultWrapper $resultSet, $terms, $total = null ) {
$this->resultSet = $resultSet;
$this->terms = $terms;
$this->totalHits = $total;
}
return SearchResult::newFromTitle(
- Title::makeTitle( $row->page_namespace, $row->page_title )
+ Title::makeTitle( $row->page_namespace, $row->page_title ), $this
);
}
+ function rewind() {
+ if ( $this->resultSet ) {
+ $this->resultSet->rewind();
+ }
+ }
+
function free() {
if ( $this->resultSet === false ) {
return false;