function _drush_sitealias_cache_alias

8.0.x _drush_sitealias_cache_alias($alias_name, $alias_record)
6.x _drush_sitealias_cache_alias($alias_name, $alias_record)
7.x _drush_sitealias_cache_alias($alias_name, $alias_record)
3.x _drush_sitealias_cache_alias($alias_name, $alias_record)
4.x _drush_sitealias_cache_alias($alias_name, $alias_record)
5.x _drush_sitealias_cache_alias($alias_name, $alias_record)
master _drush_sitealias_cache_alias($alias_name, $alias_record)

Add an empty record for the specified alias name


$alias_name: The name of the alias, including the leading "@"

7 calls to _drush_sitealias_cache_alias()
drush_sitealias_create_self_alias in includes/
Check to see if a '@self' record was created during bootstrap. If not, make one now.
drush_sitealias_create_sites_alias in includes/
_drush_bootstrap_drush in includes/
Initial Drush bootstrap phase.
_drush_bootstrap_select_drupal_site in includes/
Determine which Drupal site will be selected.
_drush_sitealias_add_inherited_values in includes/
Check to see if there is a 'parent' item in the alias; if there is, then load the parent alias record and overlay the entries in the current alias record on top of the items from the parent record.

... See full list


includes/, line 765
The site alias API.


function _drush_sitealias_cache_alias($alias_name, $alias_record) {
  $cache = &drush_get_context('site-aliases');
  // If the alias already exists in the cache, then merge
  // the new alias with the existing alias
  if (array_key_exists($alias_name, $cache)) {
    $alias_record = array_merge($cache[$alias_name], $alias_record);
  if (!isset($alias_record['#name'])) {
    $alias_record['#name'] = trim($alias_name, '@');
  $cache[$alias_name] = $alias_record;

  // If the alias record points at a local site, make sure
  // that /drush, /sites/all/drush and the site folder for that site
  // are added to the alias path, so that other alias files
  // stored in those locations become searchable.
  if (!array_key_exists('remote-host', $alias_record) && !empty($alias_record['root'])) {
    drush_sitealias_add_to_alias_path($alias_record['root'] . '/drush');
    drush_sitealias_add_to_alias_path($alias_record['root'] . '/sites/all/drush');
    $site_dir = drush_sitealias_local_site_path($alias_record);
    if (isset($site_dir)) {