This commit is contained in:
parent
ec5bb2ea3f
commit
88336e8774
@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -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);
|
||||
|
@ -125,13 +125,13 @@ class Doctrine_Manager implements Doctrine_Configurable, Countable, IteratorAggr
|
||||
public function hasAttribute($key)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
public function setAttribute($name, $value) {}
|
||||
public function getAttribute($name) {
|
||||
if ($name == Doctrine::ATTR_MODEL_LOADING) {
|
||||
return Doctrine::MODEL_LOADING_CONSERVATIVE;
|
||||
}
|
||||
}
|
||||
|
||||
public function setAttribute($name, $value) {}
|
||||
public function getAttribute($name) {
|
||||
if ($name == Doctrine::ATTR_MODEL_LOADING) {
|
||||
return Doctrine::MODEL_LOADING_CONSERVATIVE;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user