function drush_get_option_override

8.0.x context.inc drush_get_option_override($option_overrides, $option, $default = NULL, $context = NULL)
6.x context.inc drush_get_option_override($option_overrides, $option, $default = NULL, $context = NULL)
7.x context.inc drush_get_option_override($option_overrides, $option, $default = NULL, $context = NULL)
3.x context.inc drush_get_option_override($option_overrides, $option, $value = NULL, $context = NULL)
4.x context.inc drush_get_option_override($option_overrides, $option, $value = NULL, $context = NULL)
5.x context.inc drush_get_option_override($option_overrides, $option, $default = NULL, $context = NULL)
master context.inc drush_get_option_override($option_overrides, $option, $default = NULL, $context = NULL)

Get the value for an option, but first checks the provided option overrides.

The feature of drush_get_option that allows a list of option names to be passed in an array is NOT supported.

Parameters

option_overrides: An array to check for values before calling drush_get_option.

option: The name of the option to get.

default: Optional. The value to return if the option has not been set.

context: Optional. The context to check for the option. If this is set, only this context will be searched.

2 calls to drush_get_option_override()
drush_core_call_rsync in commands/core/rsync.core.inc
Make a direct call to rsync after the source and destination paths have been evaluated.
drush_sitealias_evaluate_path in includes/sitealias.inc
Evaluate a path from its shorthand form to a literal path usable by rsync.

File

includes/context.inc, line 404
The Drush context API implementation.

Code

function drush_get_option_override($option_overrides, $option, $value = NULL, $context = NULL) {
  if (array_key_exists($option, $option_overrides)) {
    return $option_overrides[$option];
  }
  else {
    return drush_get_option($option, $value, $context);
  }
}