2008-09-12 21:25:38 +04:00
|
|
|
<?php
|
2009-01-22 22:38:10 +03:00
|
|
|
|
|
|
|
namespace Doctrine\DBAL\Driver;
|
|
|
|
|
|
|
|
use \PDO;
|
|
|
|
|
2008-09-13 14:28:29 +04:00
|
|
|
/**
|
|
|
|
* PDO implementation of the driver Connection interface.
|
|
|
|
* Used by all PDO-based drivers.
|
|
|
|
*
|
|
|
|
* @since 2.0
|
|
|
|
*/
|
2009-01-22 22:38:10 +03:00
|
|
|
class PDOConnection extends PDO implements \Doctrine\DBAL\Driver\Connection
|
2008-09-12 21:25:38 +04:00
|
|
|
{
|
|
|
|
public function __construct($dsn, $user = null, $password = null, array $options = null)
|
|
|
|
{
|
|
|
|
parent::__construct($dsn, $user, $password, $options);
|
2009-01-22 22:38:10 +03:00
|
|
|
$this->setAttribute(PDO::ATTR_STATEMENT_CLASS, array('Doctrine\DBAL\Driver\PDOStatement', array()));
|
2008-09-13 14:28:29 +04:00
|
|
|
$this->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
|
|
|
|
$this->setAttribute(PDO::ATTR_CASE, PDO::CASE_LOWER);
|
2008-09-12 21:25:38 +04:00
|
|
|
}
|
|
|
|
}
|