/** * Implementation of the next() method. * * @return Horde_Rdo_Base|null The next Rdo object in the set or * null if no more results. */ public function next() { if (is_null($this->_result)) { $this->rewind(); } if ($this->_result) { $row = $this->_result->fetch(); if (!$row) { $this->_eof = true; } else { $this->_eof = false; if (is_null($this->_index)) { $this->_index = 0; } else { ++$this->_index; } $this->_current = $this->_mapper->map($row); } } return $this->_current; }