2008-09-12 12:51:56 +04:00
|
|
|
<?php
|
|
|
|
|
2009-01-22 22:38:10 +03:00
|
|
|
namespace Doctrine\DBAL\Driver\PDOOracle;
|
2008-09-12 12:51:56 +04:00
|
|
|
|
2009-01-22 22:38:10 +03:00
|
|
|
class Driver implements \Doctrine\DBAL\Driver
|
2008-09-12 12:51:56 +04:00
|
|
|
{
|
|
|
|
|
|
|
|
public function connect(array $params, $username = null, $password = null, array $driverOptions = array())
|
|
|
|
{
|
2009-01-22 22:38:10 +03:00
|
|
|
return new \Doctrine\DBAL\Driver\PDOConnection(
|
2008-09-12 21:25:38 +04:00
|
|
|
$this->_constructPdoDsn($params),
|
|
|
|
$username,
|
|
|
|
$password,
|
|
|
|
$driverOptions);
|
2008-09-12 12:51:56 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Constructs the Oracle PDO DSN.
|
|
|
|
*
|
|
|
|
* @return string The DSN.
|
|
|
|
*/
|
|
|
|
private function _constructPdoDsn(array $params)
|
|
|
|
{
|
|
|
|
//TODO
|
|
|
|
}
|
|
|
|
|
|
|
|
public function getDatabasePlatform()
|
|
|
|
{
|
2009-01-22 22:38:10 +03:00
|
|
|
return new \Doctrine\DBAL\Platforms\OraclePlatform();
|
2008-09-12 12:51:56 +04:00
|
|
|
}
|
|
|
|
|
2009-01-22 22:38:10 +03:00
|
|
|
public function getSchemaManager(\Doctrine\DBAL\Connection $conn)
|
2008-09-12 12:51:56 +04:00
|
|
|
{
|
2009-01-22 22:38:10 +03:00
|
|
|
return new \Doctrine\DBAL\Schema\OracleSchemaManager($conn);
|
2008-09-12 12:51:56 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|