function Database::removeConnection
Remove a connection and its corresponding connection information.
Parameters
string $key: The connection key.
Return value
bool TRUE in case of success, FALSE otherwise.
6 calls to Database::removeConnection()
- DbCommandBase::getDatabaseConnection in core/
lib/ Drupal/ Core/ Command/ DbCommandBase.php - Parse input options decide on a database.
- FunctionalTestSetupTrait::doInstall in core/
lib/ Drupal/ Core/ Test/ FunctionalTestSetupTrait.php - Execute the non-interactive installer.
- Tasks::connect in core/
modules/ pgsql/ src/ Driver/ Database/ pgsql/ Install/ Tasks.php - Checks if we can connect to the database.
- Tasks::connect in core/
modules/ sqlite/ src/ Driver/ Database/ sqlite/ Install/ Tasks.php - Checks if we can connect to the database.
- Tasks::connect in core/
modules/ mysql/ src/ Driver/ Database/ mysql/ Install/ Tasks.php - Checks if we can connect to the database.
File
-
core/
lib/ Drupal/ Core/ Database/ Database.php, line 381
Class
- Database
- Primary front-controller for the database system.
Namespace
Drupal\Core\DatabaseCode
public static final function removeConnection($key) {
if (isset(self::$databaseInfo[$key])) {
self::closeConnection(NULL, $key);
unset(self::$databaseInfo[$key]);
return TRUE;
}
else {
return FALSE;
}
}