1
0
mirror of synced 2024-12-13 06:46:03 +03:00
This commit is contained in:
zYne 2008-06-02 11:35:34 +00:00
parent ec5bb2ea3f
commit 88336e8774
3 changed files with 12 additions and 12 deletions

View File

@ -44,7 +44,7 @@ class Doctrine_Connection_Mysql extends Doctrine_Connection_Common
* @param Doctrine_Manager $manager
* @param PDO|Doctrine_Adapter $adapter database handler
*/
public function __construct(Doctrine_Manager $manager, $adapter)
public function __construct($adapter, $user = null, $pass = null)
{
$this->setAttribute(PDO::ATTR_EMULATE_PREPARES, true);
$this->setAttribute(Doctrine::ATTR_DEFAULT_TABLE_TYPE, 'INNODB');
@ -87,7 +87,7 @@ class Doctrine_Connection_Mysql extends Doctrine_Connection_Common
$this->properties['varchar_max_length'] = 255;
parent::__construct($manager, $adapter);
parent::__construct($adapter, $user, $pass);
}
/**

View File

@ -46,7 +46,7 @@ class Doctrine_Connection_Sqlite extends Doctrine_Connection_Common
* @param Doctrine_Manager $manager
* @param PDO $pdo database handle
*/
public function __construct(Doctrine_Manager $manager, $adapter)
public function __construct($adapter, $user = null, $pass = null)
{
$this->supported = array('sequences' => 'emulated',
'indexes' => true,
@ -67,7 +67,7 @@ class Doctrine_Connection_Sqlite extends Doctrine_Connection_Common
'identifier_quoting' => true,
'pattern_escaping' => false,
);
parent::__construct($manager, $adapter);
parent::__construct($adapter, $user, $pass);
if ($this->isConnected) {
$this->dbh->sqliteCreateFunction('mod', array('Doctrine_Expression_Sqlite', 'modImpl'), 2);

View File

@ -325,7 +325,7 @@ class Doctrine_Manager implements Doctrine_Configurable, Countable, IteratorAggr
}
$className = $drivers[$driverName];
$conn = new $className($this, $adapter);
$conn = new $className($adapter);
$conn->setName($name);
$this->_connections[$name] = $conn;