PDOConnection.php 638 Bytes
Newer Older
romanb's avatar
romanb committed
1 2
<?php

3 4 5 6 7 8
/**
 * PDO implementation of the driver Connection interface.
 * Used by all PDO-based drivers.
 *
 * @since 2.0
 */
romanb's avatar
romanb committed
9 10 11 12 13 14
class Doctrine_DBAL_Driver_PDOConnection extends PDO implements Doctrine_DBAL_Driver_Connection
{
    public function __construct($dsn, $user = null, $password = null, array $options = null)
    {
        parent::__construct($dsn, $user, $password, $options);
        $this->setAttribute(PDO::ATTR_STATEMENT_CLASS, array('Doctrine_DBAL_Driver_PDOStatement', array()));
15 16
        $this->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
        $this->setAttribute(PDO::ATTR_CASE, PDO::CASE_LOWER);
romanb's avatar
romanb committed
17 18 19 20
    }
}

?>