File
- drupal/core/lib/Drupal/Core/Database/Connection.php, line 138
- Definition of Drupal\Core\Database\Connection
Class
- Connection
- Base Database API class.
Namespace
Drupal\Core\Database
Code
function __construct($dsn, $username, $password, $driver_options = array()) {
$this
->setPrefix(isset($this->connectionOptions['prefix']) ? $this->connectionOptions['prefix'] : '');
$driver_options[PDO::ATTR_ERRMODE] = PDO::ERRMODE_EXCEPTION;
parent::__construct($dsn, $username, $password, $driver_options);
if (!empty($this->statementClass)) {
$this
->setAttribute(PDO::ATTR_STATEMENT_CLASS, array(
$this->statementClass,
array(
$this,
),
));
}
}