1.20.x database.inc final public static Database::removeConnection($key, $close = TRUE)

Remove a connection and its corresponding connection information.

Parameters

$key: The connection key.

$close: Whether to close the connection.

Return value

TRUE in case of success, FALSE otherwise.:

File

includes/database/database.inc, line 1834
Core systems for the database layer.

Class

Database
Primary front-controller for the database system.

Code

final public static function removeConnection($key, $close = TRUE) {
  if (isset(self::$databaseInfo[$key])) {
    if ($close) {
      self::closeConnection(NULL, $key);
    }
    unset(self::$databaseInfo[$key]);
    return TRUE;
  }
  else {
    return FALSE;
  }
}