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);
}