final public static function Database::getConnectionInfo

Gets information on the specified database connection.

Parameters

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

15 calls to Database::getConnectionInfo()
ConnectionTest::testConnectionOptions in drupal/core/modules/system/lib/Drupal/system/Tests/Database/ConnectionTest.php
Tests the connection options of the active database.
ConnectionTest::testConnectionRouting in drupal/core/modules/system/lib/Drupal/system/Tests/Database/ConnectionTest.php
Tests that connections return appropriate connection objects.
ConnectionTest::testConnectionRoutingOverride in drupal/core/modules/system/lib/Drupal/system/Tests/Database/ConnectionTest.php
Tests that connections return appropriate connection objects.
ConnectionUnitTest::addConnection in drupal/core/modules/system/lib/Drupal/system/Tests/Database/ConnectionUnitTest.php
Adds a new database connection info to Database.
ConnectionUnitTest::setUp in drupal/core/modules/system/lib/Drupal/system/Tests/Database/ConnectionUnitTest.php
Sets up unit test environment.

... See full list

File

drupal/core/lib/Drupal/Core/Database/Database.php, line 288
Definition of Drupal\Core\Database\Database

Class

Database
Primary front-controller for the database system.

Namespace

Drupal\Core\Database

Code

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