function drush_sitealias_get_option

8.0.x context.inc drush_sitealias_get_option($site_alias_record, $option, $default = NULL, $prefix = '', $context = NULL)
6.x context.inc drush_sitealias_get_option($site_alias_record, $option, $default = NULL, $prefix = '', $context = NULL)
7.x context.inc drush_sitealias_get_option($site_alias_record, $option, $default = NULL, $prefix = '', $context = NULL)
5.x context.inc drush_sitealias_get_option($site_alias_record, $option, $default = NULL, $prefix = '', $context = NULL)
master context.inc drush_sitealias_get_option($site_alias_record, $option, $default = NULL, $prefix = '', $context = NULL)

Get an option out of the specified alias. If it has not been set in the alias, then get it via drush_get_option.

Parameters

site_alias_record: An array of options for an alias record.

option: The name of the option to get.

default: Optional. The value to return if the option does not exist in the site record and has not been set in a context.

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

4 calls to drush_sitealias_get_option()
drush_get_option_override in includes/context.inc
Get the value for an option, but first checks the provided option overrides.
drush_remote_host in includes/exec.inc
Determine the remote host (username@hostname.tld) for the specified site.
drush_shell_proc_build in includes/exec.inc
Build an SSH string including an optional fragment of bash. Commands that use this should also merge drush_shell_proc_build_options() into their command options.
drush_sitealias_get_db_spec in includes/sitealias.inc
Return the $db_spec record for the database associated with the provided alias record. which will be used to first add the database information to the alias records, invoking sql-conf to look them up if necessary.

File

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

Code

function drush_sitealias_get_option($site_alias_record, $option, $default = NULL, $prefix = '', $context = NULL) {
  if (is_array($site_alias_record) && array_key_exists($option, $site_alias_record)) {
    return $site_alias_record[$option];
  }
  else {
    return drush_get_option($prefix . $option, $default, $context);
  }
}