lithium\data\collection\RecordSet::_populate PHP Method

_populate() protected method

Extracts the next item from the result resource and wraps it into a Record object.
protected _populate ( ) : mixed
return mixed Returns the next `Record` if exists. Returns `null` otherwise
    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, array('exists' => true));
        $this->_result->next();
        return $result;
    }