final public static function Database::getConnectionInfo

7.x database.inc final public static Database::getConnectionInfo($key = 'default')

Gets information on the specified database connection.

Parameters

$connection: The connection key for which we want information.

13 calls to Database::getConnectionInfo()
ConnectionUnitTest::addConnection in drupal-7.x/modules/simpletest/tests/database_test.test
Adds a new database connection info to Database.
ConnectionUnitTest::setUp in drupal-7.x/modules/simpletest/tests/database_test.test
Sets up unit test environment.
DatabaseConnectionTestCase::testConnectionOptions in drupal-7.x/modules/simpletest/tests/database_test.test
Tests the connection options of the active database.
DatabaseConnectionTestCase::testConnectionRouting in drupal-7.x/modules/simpletest/tests/database_test.test
Test that connections return appropriate connection objects.
DatabaseConnectionTestCase::testConnectionRoutingOverride in drupal-7.x/modules/simpletest/tests/database_test.test
Test that connections return appropriate connection objects.

... See full list

File

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

Class

Database
Primary front-controller for the database system.

Code

final public static function getConnectionInfo($key = 'default') {
  if (empty(self::$databaseInfo)) {
    self::parseConnectionInfo();
  }

  if (!empty(self::$databaseInfo[$key])) {
    return self::$databaseInfo[$key];
  }
}