function StatementWrapperIterator::__construct
Same name in other branches
- 11.x core/lib/Drupal/Core/Database/StatementWrapperIterator.php \Drupal\Core\Database\StatementWrapperIterator::__construct()
Constructs a StatementWrapperIterator object.
Parameters
\Drupal\Core\Database\Connection $connection: Drupal database connection object.
object $clientConnection: Client database connection object, for example \PDO.
string $query: The SQL query string.
array $options: Array of query options.
bool $rowCountEnabled: (optional) Enables counting the rows matched. Defaults to FALSE.
File
-
core/
lib/ Drupal/ Core/ Database/ StatementWrapperIterator.php, line 55
Class
- StatementWrapperIterator
- StatementInterface iterator implementation.
Namespace
Drupal\Core\DatabaseCode
public function __construct(Connection $connection, object $clientConnection, string $query, array $options, bool $rowCountEnabled = FALSE) {
$this->clientStatement = $clientConnection->prepare($query, $options);
$this->setFetchMode(\PDO::FETCH_OBJ);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.