public function next() { if (!$this->_started) { $this->rewind(); } next($this->_data); $this->_valid = key($this->_data) !== null; if (!$this->_valid) { $this->_valid = $this->_populate() !== null; } return current($this->_data); }