function DrupalBoot8::bootstrap_drupal_configuration

8.0.x DrupalBoot8.php DrupalBoot8::bootstrap_drupal_configuration()
7.x DrupalBoot8.php DrupalBoot8::bootstrap_drupal_configuration()
master DrupalBoot8.php DrupalBoot8::bootstrap_drupal_configuration()

Initialize and load the Drupal configuration files.

We process and store a normalized set of database credentials from the loaded configuration file, so we can validate them and access them easily in the future.

Also override Drupal variables as per --variables option.

Overrides DrupalBoot::bootstrap_drupal_configuration

File

lib/Drush/Boot/DrupalBoot8.php, line 112

Namespace

Drush\Boot

Class

DrupalBoot8

Code

function bootstrap_drupal_configuration() {
  $this->request = Request::createFromGlobals();
  $classloader = drush_drupal_load_autoloader(DRUPAL_ROOT);
  $this->kernel = DrupalKernel::createFromRequest($this->request, $classloader, 'prod');

  // Unset drupal error handler and restore drush's one.
  restore_error_handler();

  parent::bootstrap_drupal_configuration();
}