lithium\data\source\Result::next()
Fetches the next element from the resource.
Returns
mixedThe next result (or null
if there is none).
Source
public function next() {
if ($this->_buffer) {
list($this->_key, $this->_current) = array_shift($this->_buffer);
return $this->_current;
}
if (!$next = $this->_fetch()) {
$this->_key = null;
$this->_current = null;
$this->_valid = false;
return null;
} else {
list($this->_key, $this->_current) = $next;
$this->_valid = true;
}
return $this->_current;
}