function drush_set_option

8.0.x drush_set_option($option, $value, $context = 'process')
6.x drush_set_option($option, $value, $context = 'process')
7.x drush_set_option($option, $value, $context = 'process')
3.x drush_set_option($option, $value, $context = 'process')
4.x drush_set_option($option, $value, $context = 'process')
5.x drush_set_option($option, $value, $context = 'process')
master drush_set_option($option, $value, $context = 'process')

Set an option in one of the option contexts.


option: The option to set.

value: The value to set it to.

context: Optional. Which context to set it in.

Return value

The value parameter. This allows for neater code such as $myvalue = drush_set_option('http_host', $_SERVER['HTTP_HOST']); Without having to constantly type out the value parameter.

31 calls to drush_set_option()
drush_adjust_args_if_shebang_script in includes/
Special checking for "shebang" script handling.
drush_config_export_validate in commands/core/
drush_core_help in commands/core/
Command callback for help command. This is the default command, when none other has been specified.
drush_core_quick_drupal in commands/core/
Callback for core-quick-drupal command.
drush_core_runserver in commands/runserver/
Callback for runserver command.

... See full list


includes/, line 598
The Drush context API implementation.


function drush_set_option($option, $value, $context = 'process') {
  $cache = &drush_get_context($context);
  $cache[$option] = $value;
  return $value;