You are here

final public static function Database::setMultipleConnectionInfo in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 core/lib/Drupal/Core/Database/Database.php \Drupal\Core\Database\Database::setMultipleConnectionInfo()

Sets connection information for multiple databases.

Parameters

array $databases: A multi-dimensional array specifying database connection parameters, as defined in settings.php.

1 call to Database::setMultipleConnectionInfo()
Settings::initialize in core/lib/Drupal/Core/Site/Settings.php
Bootstraps settings.php and the Settings singleton.

File

core/lib/Drupal/Core/Database/Database.php, line 292
Contains \Drupal\Core\Database\Database.

Class

Database
Primary front-controller for the database system.

Namespace

Drupal\Core\Database

Code

public static final function setMultipleConnectionInfo(array $databases) {
  foreach ($databases as $key => $targets) {
    foreach ($targets as $target => $info) {
      self::addConnectionInfo($key, $target, $info);
    }
  }
}