function drush_set_context

8.0.x drush_set_context($context, $value)
6.x drush_set_context($context, $value)
7.x drush_set_context($context, $value)
3.x drush_set_context($context, $value)
4.x drush_set_context($context, $value)
5.x drush_set_context($context, $value)
master drush_set_context($context, $value)

Set a specific context.


context: Any of the default defined contexts.

value: The value to store in the context

Return value

An associative array of the settings specified in the request context.

50 calls to drush_set_context()
commandUnitCase::testCommandVersionSpecific in tests/commandUnitTest.php
Assure that matching version-specific command files are loaded and others are ignored.
drush_adjust_args_if_shebang_script in includes/
Special checking for "shebang" script handling.
drush_backend_parse_packets in includes/
Parse out and remove backend packet from the supplied string and invoke the commands.
drush_backend_set_result in includes/
The backend result is the original PHP data structure (usually an array) used to generate the output for the current command.
drush_bootstrap in includes/
Bootstrap Drush to the desired phase.

... See full list


includes/, line 289
The Drush context API implementation.


function drush_set_context($context, $value) {
  $cache = &drush_get_context($context);
  $cache = $value;
  return $value;