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.

3 calls to drush_bootstrap_value()
_drush_bootstrap_do_drupal_site in includes/bootstrap.inc
Called by _drush_bootstrap_drupal_site to do the main work of the drush drupal site bootstrap.
_drush_bootstrap_drupal_root_validate in includes/bootstrap.inc
Validate the DRUSH_BOOTSTRAP_DRUPAL_ROOT phase.
_drush_bootstrap_drupal_site_validate in includes/bootstrap.inc
VALIDATE the DRUSH_BOOTSTRAP_DRUPAL_SITE phase.

File

includes/bootstrap.inc, line 996
Drush bootstrapping code.

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;
}