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.

12 calls to drush_set_option()
drush_core_watchdog_list in commands/core/watchdog.drush.inc
Command callback.
drush_set_default in includes/context.inc
A small helper function to set the value in the default context
drush_sitealias_evaluate_path in includes/sitealias.inc
Evaluate a path from its shorthand form to a literal path usable by rsync.
drush_upgrade_site_upgrade in commands/core/upgrade.drush.inc
A drush command callback.
update_main in commands/core/drupal/update_5.inc

... See full list

File

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

Code

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