final public static function Database::removeConnection

7.x database.inc final public static Database::removeConnection($key)

Remove a connection and its corresponding connection information.

Parameters

$key: The connection key.

Return value

TRUE in case of success, FALSE otherwise.

2 calls to Database::removeConnection()
DrupalUnitTestCase::tearDown in drupal-7.x/modules/simpletest/drupal_web_test_case.php
DrupalWebTestCase::tearDown in drupal-7.x/modules/simpletest/drupal_web_test_case.php
Delete created files and temporary files directory, delete the tables created by setUp(), and reset the database prefix.

File

drupal-7.x/includes/database/database.inc, line 1645
Core systems for the database layer.

Class

Database
Primary front-controller for the database system.

Code

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