1
0
mirror of synced 2024-12-14 07:06:04 +03:00
This commit is contained in:
zYne 2006-12-07 23:26:38 +00:00
parent 7a35e676a9
commit 9bed1ba118

View File

@ -144,8 +144,12 @@ class Doctrine_Manager extends Doctrine_Configurable implements Countable, Itera
* @throws Doctrine_Manager_Exception if trying to bind a connection with an existing name
* @return Doctrine_Connection
*/
public static function connection($adapter, $name = null) {
return Doctrine_Manager::getInstance()->openConnection($adapter, $name);
public static function connection($adapter = null, $name = null) {
if($adapter == null) {
return Doctrine_Manager::getInstance()->getCurrentConnection();
} else {
return Doctrine_Manager::getInstance()->openConnection($adapter, $name);
}
}
/**
* openConnection