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.

5 calls to drush_bootstrap_value()
drush_sitealias_evaluate_path in includes/sitealias.inc
Evaluate a path from its shorthand form to a literal path usable by rsync.
_drush_bootstrap_do_drupal_site in includes/environment.inc
Called by _drush_bootstrap_drupal_site to do the main work of the drush drupal site bootstrap.
_drush_bootstrap_drupal_root in includes/environment.inc
Bootstrap Drush with a valid Drupal Directory.
_drush_bootstrap_drupal_root_validate in includes/environment.inc
Validate the DRUSH_BOOTSTRAP_DRUPAL_ROOT phase.
_drush_bootstrap_drupal_site_validate in includes/environment.inc
VALIDATE the DRUSH_BOOTSTRAP_DRUPAL_SITE phase.

File

includes/environment.inc, line 310
Functions used by drush to query the environment and setting the current configuration.

Code

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

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

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

  return null;
}