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.

11 calls to drush_get_option_list()
DrupalBoot::bootstrap_drupal_configuration in lib/Drush/Boot/DrupalBoot.php
Initialize and load the Drupal configuration files.
DrupalBoot::commandfile_searchpaths in lib/Drush/Boot/DrupalBoot.php
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_filename_blacklist in includes/command.inc
Substrings to ignore during commandfile and site alias searching.

... See full list

File

includes/context.inc, line 449
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;
}