You are here

class AsgardInstaller in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/composer/installers/src/Composer/Installers/AsgardInstaller.php \Composer\Installers\AsgardInstaller

Hierarchy

Expanded class hierarchy of AsgardInstaller

1 file declares its use of AsgardInstaller
AsgardInstallerTest.php in vendor/composer/installers/tests/Composer/Installers/Test/AsgardInstallerTest.php

File

vendor/composer/installers/src/Composer/Installers/AsgardInstaller.php, line 4

Namespace

Composer\Installers
View source
class AsgardInstaller extends BaseInstaller {
  protected $locations = array(
    'module' => 'Modules/{$name}/',
    'theme' => 'Themes/{$name}/',
  );

  /**
   * Format package name.
   *
   * For package type asgard-module, cut off a trailing '-plugin' if present.
   *
   * For package type asgard-theme, cut off a trailing '-theme' if present.
   *
   */
  public function inflectPackageVars($vars) {
    if ($vars['type'] === 'asgard-module') {
      return $this
        ->inflectPluginVars($vars);
    }
    if ($vars['type'] === 'asgard-theme') {
      return $this
        ->inflectThemeVars($vars);
    }
    return $vars;
  }
  protected function inflectPluginVars($vars) {
    $vars['name'] = ucfirst(preg_replace('/-module/', '', $vars['name']));
    return $vars;
  }
  protected function inflectThemeVars($vars) {
    $vars['name'] = ucfirst(preg_replace('/-theme$/', '', $vars['name']));
    return $vars;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
AsgardInstaller::$locations protected property Overrides BaseInstaller::$locations
AsgardInstaller::inflectPackageVars public function Format package name. Overrides BaseInstaller::inflectPackageVars
AsgardInstaller::inflectPluginVars protected function
AsgardInstaller::inflectThemeVars protected function
BaseInstaller::$composer protected property
BaseInstaller::$package protected property
BaseInstaller::getInstallPath public function Return the install path based on package type. 1
BaseInstaller::getLocations public function Gets the installer's locations 1
BaseInstaller::mapCustomInstallPaths protected function Search through a passed paths array for a custom install path.
BaseInstaller::templatePath protected function Replace vars in a path
BaseInstaller::__construct public function Initializes base installer.