lithium\data\source\Result::peek PHP Method

peek() public method

Peeks at the next element in the resource without advancing Result's cursor.
public peek ( ) : mixed
return mixed The next result (or `null` if there is none).
    public function peek()
    {
        if ($this->_buffer) {
            return reset($this->_buffer);
        }
        if (!($next = $this->_fetch())) {
            return null;
        }
        $this->_buffer[] = $next;
        $first = reset($this->_buffer);
        return end($first);
    }