- $this->result = $match;
- }
-
- public function numRows() {
- return $this->result ? 1 : 0;
- }
-
- public function next() {
- if ( $this->fetched || !$this->result ) {
- return false;
+ if ( $match === null ) {
+ $this->results = [];
+ } else {
+ $this->results = [ SearchResult::newFromTitle( $match, $this ) ];