lithium\data\Collection::next PHP Method

next() public method

Returns the next document in the set, and advances the object's internal pointer. If the end of the set is reached, a new document will be fetched from the data source connection handle If no more documents can be fetched, returns null.
public next ( ) : mixed
return mixed Returns the next document in the set, or `false`, if no more documents are available.
    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);
    }