function drush_get_merged_options

8.0.x context.inc drush_get_merged_options()
6.x context.inc drush_get_merged_options()
7.x context.inc drush_get_merged_options()
3.x context.inc drush_get_merged_options()
4.x context.inc drush_get_merged_options()
5.x context.inc drush_get_merged_options()
master context.inc drush_get_merged_options()

Retrieves a collapsed list of all options.

3 calls to drush_get_merged_options()
drush_backend_output in includes/backend.inc
Print the json-encoded output of this command, including the encoded log records, context information, etc.
drush_get_merged_prefixed_options in includes/context.inc
Retrieves a collapsed list of all options with a specified prefix.
_drush_usage_log in commands/core/usage.drush.inc

File

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

Code

function drush_get_merged_options() {
  $contexts = drush_context_names();
  $cache = drush_get_context();
  $result = array();
  foreach (array_reverse($contexts) as $context) {
    if (array_key_exists($context, $cache)) {
      $result = array_merge($result, $cache[$context]);
    }
  }

  return $result;
}