lithium\data\source\database\adapter\pdo\Result::_fetch()
Implements
lithium\data\source\Result::_fetch()
Fetches the next result from the resource.
Returns
array|boolean|nullReturns a key/value pair for the next result,
null
if there is none, false
if something bad happened.
Source
protected function _fetch() {
if (!$this->_resource instanceof PDOStatement) {
$this->close();
return false;
}
try {
if ($result = $this->_resource->fetch(PDO::FETCH_NUM)) {
return [$this->_iterator++, $result];
}
} catch (PDOException $e) {
$this->close();
return false;
}
return null;
}