lithium\data\collection\DocumentSet::_populate()
Implements
lithium\data\Collection::_populate()
Extract the next item from the result ressource and wraps it into a Document object.
Returns
mixedReturns 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;
}