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.

4 calls to drush_get_option_list()
drush_pm_updatecode in commands/pm/updatecode.pm.inc
Command callback. Displays update status info and allows to update installed projects. Pass specific projects as arguments, otherwise we update all that have candidate releases.
_drush_add_commandfiles in includes/command.inc
_drush_find_commandfiles in includes/command.inc
_drush_user_get_users_from_options_and_arguments in commands/user/user.drush.inc
Return the list of matching uids given

File

includes/context.inc, line 418
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 = explode(',', $result);
  }

  return $result;
}