lithium\data\Collection::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.

Returns

mixed

Returns the next document in the set, or false, if no more documents are available.

Source

	public function next(): mixed {
		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);
	}