You are here

final public static function Database::getConnectionInfo in Drupal 7

Gets information on the specified database connection.

Parameters

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

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

... See full list

File

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

Class

Database
Primary front-controller for the database system.

Code

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