This commit is contained in:
parent
7a35e676a9
commit
9bed1ba118
@ -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
|
* @throws Doctrine_Manager_Exception if trying to bind a connection with an existing name
|
||||||
* @return Doctrine_Connection
|
* @return Doctrine_Connection
|
||||||
*/
|
*/
|
||||||
public static function connection($adapter, $name = null) {
|
public static function connection($adapter = null, $name = null) {
|
||||||
return Doctrine_Manager::getInstance()->openConnection($adapter, $name);
|
if($adapter == null) {
|
||||||
|
return Doctrine_Manager::getInstance()->getCurrentConnection();
|
||||||
|
} else {
|
||||||
|
return Doctrine_Manager::getInstance()->openConnection($adapter, $name);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* openConnection
|
* openConnection
|
||||||
|
Loading…
x
Reference in New Issue
Block a user