function drush_bootstrap_value

8.0.x bootstrap.inc drush_bootstrap_value($context, $value = null)
6.x bootstrap.inc drush_bootstrap_value($context, $value = null)
7.x bootstrap.inc drush_bootstrap_value($context, $value = null)
3.x environment.inc drush_bootstrap_value($context, $value = null)
4.x environment.inc drush_bootstrap_value($context, $value = null)
5.x bootstrap.inc drush_bootstrap_value($context, $value = null)
master bootstrap.inc drush_bootstrap_value($context, $value = null)

Helper function to store any context settings that are being validated.

4 calls to drush_bootstrap_value()
DrupalBoot::bootstrap_do_drupal_site in lib/Drush/Boot/DrupalBoot.php
Called by bootstrap_drupal_site to do the main work of the drush drupal site bootstrap.
DrupalBoot::bootstrap_drupal_root in lib/Drush/Boot/DrupalBoot.php
Bootstrap Drush with a valid Drupal Directory.
DrupalBoot::bootstrap_drupal_root_validate in lib/Drush/Boot/DrupalBoot.php
Validate the DRUSH_BOOTSTRAP_DRUPAL_ROOT phase.
DrupalBoot::bootstrap_drupal_site_validate_settings_present in lib/Drush/Boot/DrupalBoot.php
Validate that the Drupal site has all of the settings that it needs to operated.

File

includes/bootstrap.inc, line 269

Code

function drush_bootstrap_value($context, $value = null) {
  $values = &drush_get_context('DRUSH_BOOTSTRAP_VALUES', array());

  if (isset($value)) {
    $values[$context] = $value;
  }

  if (array_key_exists($context, $values)) {
    return $values[$context];
  }

  return null;
}