src/Robo/BltTasks.php
public function switchSiteContext($site_name) {
    $this->logger->debug("Switching site context to <comment>$site_name</comment>.");
    $config_initializer = new ConfigInitializer($this->getConfigValue('repo.root'), $this->input());
    $config_initializer->setSite($site_name);
    $new_config = $config_initializer->initialize();

    // Replaces config.
    $this->getConfig()->import($new_config->export());
  }
public function switchSiteContext($site_name) {
    $this->logger->debug("Switching site context to <comment>$site_name</comment>.");
    $config_initializer = new ConfigInitializer($this->getConfigValue('repo.root'), $this->input());
    $config_initializer->setSite($site_name);
    $new_config = $config_initializer->initialize();

    // Replaces config.
    $this->getConfig()->import($new_config->export());
  }
public function switchSiteContext ( $ site_name ) { $ this -> logger -> debug ( "Switching site context to <comment>$site_name</comment>." ) ; $ config_initializer = new ConfigInitializer ( $ this -> getConfigValue ( 'repo.root' ) , $ this -> input ( ) ) ; $ config_initializer -> setSite ( $ site_name ) ; $ new_config = $ config_initializer -> initialize ( ) ; // Replaces config. $ this -> getConfig ( ) -> import ( $ new_config -> export ( ) ) ; }
Sets multisite context by settings site-specific config values.

@param string $site_name
The name of a multisite, e.g., if docroot/sites/example.com is the site,
$site_name would be example.com.
Sets multisite context by settings site - specific config values .