function drush_bootstrap_max_to_sitealias

8.0.x bootstrap.inc drush_bootstrap_max_to_sitealias($site_record, $max_phase_index = NULL)
6.x bootstrap.inc drush_bootstrap_max_to_sitealias($site_record, $max_phase_index = NULL)
7.x bootstrap.inc drush_bootstrap_max_to_sitealias($site_record, $max_phase_index = NULL)
4.x environment.inc drush_bootstrap_max_to_sitealias($site_record, $max_phase_index = NULL)
5.x bootstrap.inc drush_bootstrap_max_to_sitealias($site_record, $max_phase_index = NULL)
master bootstrap.inc drush_bootstrap_max_to_sitealias($site_record, $max_phase_index = NULL)

Bootstrap the specified site alias. The site alias must be a valid alias to a local site.

@returns TRUE if attempted to bootstrap, or FALSE if no bootstrap attempt was made.

Parameters

$site_record: The alias record for the given site alias. @see drush_sitealias_get_record().

$max_phase_index: Only attempt bootstrap to the specified level.

2 calls to drush_bootstrap_max_to_sitealias()
drush_sql_sync in commands/sql/sync.sql.inc
drush_sql_sync_init in commands/sql/sync.sql.inc
Sql sync init function. Bootstrap either the source or the destination site. At least one of the sites must be local for this to work; if both sites are remote, then it clearly will not be possible to bootstrap to either of them. If both are local,…

File

includes/environment.inc, line 367
Functions used by drush to query the environment and setting the current configuration.

Code

function drush_bootstrap_max_to_sitealias($site_record, $max_phase_index = NULL) {
  if ((array_key_exists('root', $site_record) && !array_key_exists('remote-host', $site_record))) {
    drush_sitealias_set_alias_context($site_record);
    drush_bootstrap_max($max_phase_index);
    return TRUE;
  }
  return FALSE;
}