public static Settings::initialize($app_root, $site_path, &$class_loader)
Bootstraps settings.php and the Settings singleton.
string $app_root: The app root.
string $site_path: The current site path.
\Composer\Autoload\ClassLoader $class_loader: The class loader that is used for this request. Passed by reference and exposed to the local scope of settings.php, so as to allow it to be decorated with Symfony's ApcClassLoader, for example.
public static function initialize($app_root, $site_path, &$class_loader) { // Export these settings.php variables to the global namespace. global $config_directories, $config; $settings = array(); $config = array(); $databases = array(); if (is_readable($app_root . '/' . $site_path . '/settings.php')) { require $app_root . '/' . $site_path . '/settings.php'; } // Initialize Database. Database::setMultipleConnectionInfo($databases); // Initialize Settings. new Settings($settings); }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Site!Settings.php/function/Settings::initialize/8.1.x