function drush_get_option_list

8.0.x context.inc drush_get_option_list($option, $default = array(), $context = NULL)
6.x context.inc drush_get_option_list($option, $default = array(), $context = NULL)
7.x context.inc drush_get_option_list($option, $default = array(), $context = NULL)
4.x context.inc drush_get_option_list($option, $default = array(), $context = NULL)
5.x context.inc drush_get_option_list($option, $default = array(), $context = NULL)
master context.inc drush_get_option_list($option, $default = array(), $context = NULL)

Get the value for an option and return it as a list. If the option in question is passed on the command line, its value should be a comma-separated list (e.g. --flag=1,2,3). If the option was set in a drushrc.php file, then its value may be either a comma-separated list or an array of values (e.g. $option['flag'] = array('1', '2', '3')).

Parameters

option: The name of the option to get

default: Optional. The value to return if the option has not been set

context: Optional. The context to check for the option. If this is set, only this context will be searched.

10 calls to drush_get_option_list()
drush_core_requirements in commands/core/core.drush.inc
Command callback. Provides information from the 'Status Reports' admin page.
drush_core_runserver in commands/runserver/runserver.drush.inc
Callback for runserver command.
drush_handle_command_output in includes/command.inc
Convert the structured output array provided from the Drush command into formatted output. Output is only printed for commands that define 'default-format' &/or 'default-pipe-format'; all other commands are expected to do…
drush_make in commands/make/make.drush.inc
Drush callback; make based on the makefile.
drush_pm_updatestatus in commands/pm/updatestatus.pm.inc
Command callback. Displays update status info of installed projects.

... See full list

File

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

Code

function drush_get_option_list($option, $default = array(), $context = NULL) {
  $result = drush_get_option($option, $default, $context);

  if (!is_array($result)) {
    $result = array_map('trim', array_filter(explode(',', $result)));
  }

  return $result;
}