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
1 2 3 4 5 6 7 | 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.