Files
piratepoet/lib/Doctrine/Driver/Driver.php
Pavel Dohnal a751a2a459 Add custom Doctrine Driver
[MAILPOET-3150]
2020-11-16 09:41:13 +01:00

23 lines
548 B
PHP

<?php
namespace MailPoet\Doctrine\Driver;
use MailPoetVendor\Doctrine\DBAL\DBALException;
class Driver extends \MailPoetVendor\Doctrine\DBAL\Driver\PDOMySql\Driver {
public function connect(array $params, $username = null, $password = null, array $driverOptions = []) {
try {
$conn = new PDOConnection(
$this->constructPdoDsn($params),
$username,
$password,
$driverOptions
);
} catch (\PDOException $e) {
throw DBALException::driverException($this, $e);
}
return $conn;
}
}