function DrupalBoot::bootstrap_drupal_configuration

8.0.x DrupalBoot.php DrupalBoot::bootstrap_drupal_configuration()
7.x DrupalBoot.php DrupalBoot::bootstrap_drupal_configuration()
master DrupalBoot.php DrupalBoot::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.

6 calls to DrupalBoot::bootstrap_drupal_configuration()
DrupalBoot6::bootstrap_drupal_configuration in lib/Drush/Boot/DrupalBoot6.php
Initialize and load the Drupal configuration files.
DrupalBoot6::bootstrap_drupal_configuration in lib/Drush/Boot/DrupalBoot6.php
Initialize and load the Drupal configuration files.
DrupalBoot7::bootstrap_drupal_configuration in lib/Drush/Boot/DrupalBoot7.php
Initialize and load the Drupal configuration files.
DrupalBoot7::bootstrap_drupal_configuration in lib/Drush/Boot/DrupalBoot7.php
Initialize and load the Drupal configuration files.
DrupalBoot8::bootstrap_drupal_configuration in lib/Drush/Boot/DrupalBoot8.php
Initialize and load the Drupal configuration files.

... See full list

15 methods override DrupalBoot::bootstrap_drupal_configuration()
DrupalBoot6::bootstrap_drupal_configuration in lib/Drush/Boot/DrupalBoot6.php
Initialize and load the Drupal configuration files.
DrupalBoot6::bootstrap_drupal_configuration in lib/Drush/Boot/DrupalBoot6.php
Initialize and load the Drupal configuration files.
DrupalBoot6::bootstrap_drupal_configuration in lib/Drush/Boot/DrupalBoot6.php
Initialize and load the Drupal configuration files.
DrupalBoot6::bootstrap_drupal_configuration in lib/Drush/Boot/DrupalBoot6.php
Initialize and load the Drupal configuration files.
DrupalBoot6::bootstrap_drupal_configuration in lib/Drush/Boot/DrupalBoot6.php
Initialize and load the Drupal configuration files.

... See full list

File

lib/Drush/Boot/DrupalBoot.php, line 424

Namespace

Drush\Boot

Class

DrupalBoot

Code

function bootstrap_drupal_configuration() {
  global $conf;

  $override = array(
    'dev_query' => FALSE, // Force Drupal6 not to store queries since we are not outputting them.
    'cron_safe_threshold' => 0, // Don't run poormanscron during Drush request (D7+).
  );

  $current_override = drush_get_option_list('variables');
  foreach ($current_override as $name => $value) {
    if (is_numeric($name) && (strpos($value, '=') !== FALSE)) {
      list($name, $value) = explode('=', $value, 2);
    }
    $override[$name] = $value;
  }
  $conf = is_array($conf) ? array_merge($conf, $override) : $conf;
}