2008-09-12 12:51:56 +04:00
|
|
|
<?php
|
|
|
|
|
2009-01-22 22:38:10 +03:00
|
|
|
namespace Doctrine\DBAL\Driver\PDOMsSql;
|
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 Connection(
|
2008-09-12 21:25:38 +04:00
|
|
|
$this->_constructPdoDsn($params),
|
|
|
|
$username,
|
|
|
|
$password,
|
|
|
|
$driverOptions);
|
2008-09-12 12:51:56 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Constructs the MySql PDO DSN.
|
|
|
|
*
|
|
|
|
* Overrides Connection#_constructPdoDsn().
|
|
|
|
*
|
|
|
|
* @return string The DSN.
|
|
|
|
*/
|
|
|
|
private function _constructPdoDsn(array $params)
|
|
|
|
{
|
|
|
|
//TODO
|
|
|
|
}
|
|
|
|
|
|
|
|
public function getDatabasePlatform()
|
|
|
|
{
|
|
|
|
return new Doctrine_DatabasePlatform_MySqlPlatform();
|
|
|
|
}
|
|
|
|
|
|
|
|
public function getSchemaManager(Doctrine_Connection $conn)
|
|
|
|
{
|
|
|
|
return new Doctrine_Schema_MySqlSchemaManager($conn);
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|