/var/www/vhosts/ihelp.ro/_OLD/vendor/cakephp/cakephp/src/Database/Statement
Edit: /var/www/vhosts/ihelp.ro/_OLD/vendor/cakephp/cakephp/src/Database/Statement/CallbackStatement.php (2583B)
_callback = $callback;
}
/**
* Fetch a row from the statement.
*
* The result will be processed by the callback when it is not `false`.
*
* @param string|int $type Either 'num' or 'assoc' to indicate the result format you would like.
* @return array|false
*/
public function fetch($type = parent::FETCH_TYPE_NUM)
{
$callback = $this->_callback;
$row = $this->_statement->fetch($type);
return $row === false ? $row : $callback($row);
}
/**
* Fetch all rows from the statement.
*
* Each row in the result will be processed by the callback when it is not `false.
*
* @param string|int $type Either 'num' or 'assoc' to indicate the result format you would like.
* @return array
*/
public function fetchAll($type = parent::FETCH_TYPE_NUM): array
{
/** @psalm-suppress PossiblyFalseArgument */
return array_map($this->_callback, $this->_statement->fetchAll($type));
}
}