function drush_set_option

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

Set an option in one of the option contexts.

Parameters

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/command.inc
Special checking for "shebang" script handling.
drush_config_export_validate in commands/core/config.drush.inc
drush_core_help in commands/core/help.drush.inc
Command callback for help command. This is the default command, when none other has been specified.
drush_core_quick_drupal in commands/core/core.drush.inc
Callback for core-quick-drupal command.
drush_core_runserver in commands/runserver/runserver.drush.inc
Callback for runserver command.

... See full list

File

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

Code

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