function PdoResult::fetchAll
Returns an array containing all of the result set rows.
Parameters
\Drupal\Core\Database\Statement\FetchAs $mode: One of the cases of the FetchAs enum.
array{class?: class-string, constructor_args?: list<mixed>, column?: int, cursor_orientation?: int, cursor_offset?: int} $fetchOptions: An array of fetch options.
Return value
array An array of results.
Overrides ResultBase::fetchAll
File
-
core/
lib/ Drupal/ Core/ Database/ Statement/ PdoResult.php, line 82
Class
- PdoResult
- Class for PDO-provided results of a data query language (DQL) statement.
Namespace
Drupal\Core\Database\StatementCode
public function fetchAll(FetchAs $mode, array $fetchOptions) : array {
return $this->clientFetchAll($mode, $fetchOptions['column'] ?? $fetchOptions['class'] ?? NULL, $fetchOptions['constructor_args'] ?? NULL);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.