File
- drupal/includes/database/database.inc, line 313
- Core systems for the database layer.
Class
- DatabaseConnection
- Base Database API class.
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,
),
));
}
}