src/Robo/Commands/Generate/AliasesCommand.php
protected function writeSiteAliases($site_id, array $aliases) {

    if (!is_dir($this->siteAliasDir)) {
      mkdir($this->siteAliasDir);
    }
    $filePath = $this->siteAliasDir . '/' . $site_id . '.site.yml';
    if (file_exists($filePath)) {
      if (!$this->confirm("File $filePath already exists and will be overwritten. Continue?")) {
        throw new \Exception("Aborted at user request");
      }
    }

    file_put_contents($filePath, Yaml::dump($aliases));
    return $filePath;
  }
protected function writeSiteAliases($site_id, array $aliases) {

    if (!is_dir($this->siteAliasDir)) {
      mkdir($this->siteAliasDir);
    }
    $filePath = $this->siteAliasDir . '/' . $site_id . '.site.yml';
    if (file_exists($filePath)) {
      if (!$this->confirm("File $filePath already exists and will be overwritten. Continue?")) {
        throw new \Exception("Aborted at user request");
      }
    }

    file_put_contents($filePath, Yaml::dump($aliases));
    return $filePath;
  }
protected function writeSiteAliases ( $ site_id , array $ aliases ) { if ( ! is_dir ( $ this -> siteAliasDir ) ) { mkdir ( $ this -> siteAliasDir ) ; } $ filePath = $ this -> siteAliasDir . '/' . $ site_id . '.site.yml' ; if ( file_exists ( $ filePath ) ) { if ( ! $ this -> confirm ( "File $filePath already exists and will be overwritten. Continue?" ) ) { throw new \ Exception ( "Aborted at user request" ) ; } } file_put_contents ( $ filePath , Yaml :: dump ( $ aliases ) ) ; return $ filePath ; }
Writes site aliases to disk.

@param string $site_id
The siteID or alias group.
@param array $aliases
The alias array for this site group.

@return string
The alias site group file path.

@throws \Exception
Writes site aliases to disk .