final public static Database::setActiveConnection($key = 'default')
Sets the active connection to the specified key.
Return value
string|null The previous database connection key.
File
- core/lib/Drupal/Core/Database/Database.php, line 191
Class
- Database
- Primary front-controller for the database system.
Namespace
Drupal\Core\Database
Code
final public static function setActiveConnection($key = 'default') { if (!empty(self::$databaseInfo[$key])) { $old_key = self::$activeKey; self::$activeKey = $key; return $old_key; } }
Please login to continue.