function _drush_get_option

8.0.x _drush_get_option($option, $context)
6.x _drush_get_option($option, $context)
7.x _drush_get_option($option, $context)
3.x _drush_get_option($option, $context)
4.x _drush_get_option($option, $context)
5.x _drush_get_option($option, $context)
master _drush_get_option($option, $context)

Helper function to recurse through possible option names

2 calls to _drush_get_option()
drush_get_context_options in includes/
Get all of the values for an option in every context.
drush_get_option in includes/
Get the value for an option.


includes/, line 563
The Drush context API implementation.


function _drush_get_option($option, $context) {
  if (is_array($option)) {
    foreach ($option as $current) {
      if (array_key_exists($current, $context)) {
        return $context[$current];
  elseif (array_key_exists($option, $context)) {
    return $context[$option];

  return NULL;