/**
* {@inheritdoc}
*/
public function connect(array $params, $username = null, $password = null, array $driverOptions = array())
{
try {
$pdo = new PDOConnection($this->_constructPdoDsn($params), $username, $password, $driverOptions);
if (PHP_VERSION_ID >= 50600 && (!isset($driverOptions[PDO::PGSQL_ATTR_DISABLE_PREPARES]) || true === $driverOptions[PDO::PGSQL_ATTR_DISABLE_PREPARES])) {
$pdo->setAttribute(PDO::PGSQL_ATTR_DISABLE_PREPARES, true);
}
return $pdo;
} catch (PDOException $e) {
throw DBALException::driverException($this, $e);
}
}