lithium\data\source\Result::peek()

public method

Peeks at the next element in the resource without advancing Result's cursor.

Returns

mixed

The next result (or null if there is none).

Source

	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);
	}