diff --git a/lib/Doctrine/Connection/Mysql.php b/lib/Doctrine/Connection/Mysql.php index 0eb72ebea..131db1633 100644 --- a/lib/Doctrine/Connection/Mysql.php +++ b/lib/Doctrine/Connection/Mysql.php @@ -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); } /** diff --git a/lib/Doctrine/Connection/Sqlite.php b/lib/Doctrine/Connection/Sqlite.php index 64d367ff9..8d437026e 100644 --- a/lib/Doctrine/Connection/Sqlite.php +++ b/lib/Doctrine/Connection/Sqlite.php @@ -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); diff --git a/lib/Doctrine/Manager.php b/lib/Doctrine/Manager.php index 875b63ac7..9ae27cb79 100644 --- a/lib/Doctrine/Manager.php +++ b/lib/Doctrine/Manager.php @@ -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;