lithium\data\source\mongo_db\Result::_fetch PHP Method

_fetch() protected method

Fetches the next result from the resource.
protected _fetch ( ) : array | boolean | null
return array | boolean | null Returns a key/value pair for the next result, `null` if there is none, `false` if something bad happened.
    protected function _fetch()
    {
        if (!$this->_resource) {
            return false;
        }
        if (!$this->_resource->hasNext()) {
            return null;
        }
        $result = $this->_resource->getNext();
        if ($result instanceof MongoGridFSFile) {
            $result = array('file' => $result) + $result->file;
        }
        return array($this->_iterator, $result);
    }
Result