1
0
mirror of synced 2025-01-06 00:57:10 +03:00

Module constructor no longed needs Connection object

This commit is contained in:
zYne 2006-11-19 14:35:19 +00:00
parent 281b30fb1f
commit eedfb40e76

View File

@ -43,7 +43,10 @@ class Doctrine_Connection_Module {
* @param Doctrine_Connection $conn Doctrine_Connection object, every connection * @param Doctrine_Connection $conn Doctrine_Connection object, every connection
* module holds an instance of Doctrine_Connection * module holds an instance of Doctrine_Connection
*/ */
public function __construct(Doctrine_Connection $conn) { public function __construct($conn = null) {
if( ! ($conn instanceof Doctrine_Connection))
$conn = Doctrine_Manager::getInstance()->getCurrentConnection();
$this->conn = $conn; $this->conn = $conn;
$e = explode('_', get_class($this)); $e = explode('_', get_class($this));