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

protected method

Extract the next item from the result ressource and wraps it into a Document object.

Returns

mixed

Returns the next Document if exists. Returns null otherwise

Source

	protected function _populate() {
		if ($this->closed() || !$this->_result->valid()) {
			return;
		}
		$data = $this->_result->current();
		$result = $this->_set($data, null, array('exists' => true, 'original' => true));
		$this->_result->next();

		return $result;
	}