final public static function Database::setActiveConnection
Sets the active connection to the specified key.
Return value
The previous database connection key.
1 call to Database::setActiveConnection()
- db_set_active in drupal-7.x/
includes/ database/ database.inc - Sets a new active database.
Archivo
- drupal-7.x/
includes/ database/ database.inc, line 1501 - Core systems for the database layer.
Class
- Database
- Primary front-controller for the database system.
Código
final public static function setActiveConnection($key = 'default') {
if (empty(self::$databaseInfo)) {
self::parseConnectionInfo();
}
if (!empty(self::$databaseInfo[$key])) {
$old_key = self::$activeKey;
self::$activeKey = $key;
return $old_key;
}
}