lithium\data\collection\RecordSet::_populate()

protected method

Extracts the next item from the result resource and wraps it into a Record object.

Returns

mixed

Returns the next Record if exists. Returns null otherwise

Source

	protected function _populate() {
		if ($this->closed() || !$this->_result->valid()) {
			return;
		}
		$data = $this->_result->current();

		if ($this->_query) {
			$data = $this->_mapRecord($data);
		}
		$result = $this->_set($data, null, ['exists' => true]);
		$this->_result->next();

		return $result;
	}