function drush_set_context

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

Set a specific context.

Parameters

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/command.inc
Special checking for "shebang" script handling.
drush_backend_parse_packets in includes/backend.inc
Parse out and remove backend packet from the supplied string and invoke the commands.
drush_backend_set_result in includes/backend.inc
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.inc
Bootstrap Drush to the desired phase.

... See full list

File

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

Code

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