You are here

class TYPO3FlowInstaller in Zircon Profile 8.0

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

An installer to handle TYPO3 Flow specifics when installing packages.

Hierarchy

Expanded class hierarchy of TYPO3FlowInstaller

File

vendor/composer/installers/src/Composer/Installers/TYPO3FlowInstaller.php, line 7

Namespace

Composer\Installers
View source
class TYPO3FlowInstaller extends BaseInstaller {
  protected $locations = array(
    'package' => 'Packages/Application/{$name}/',
    'framework' => 'Packages/Framework/{$name}/',
    'plugin' => 'Packages/Plugins/{$name}/',
    'site' => 'Packages/Sites/{$name}/',
    'boilerplate' => 'Packages/Boilerplates/{$name}/',
    'build' => 'Build/{$name}/',
  );

  /**
   * Modify the package name to be a TYPO3 Flow style key.
   *
   * @param  array $vars
   * @return array
   */
  public function inflectPackageVars($vars) {
    $autoload = $this->package
      ->getAutoload();
    if (isset($autoload['psr-0']) && is_array($autoload['psr-0'])) {
      $namespace = key($autoload['psr-0']);
      $vars['name'] = str_replace('\\', '.', $namespace);
    }
    if (isset($autoload['psr-4']) && is_array($autoload['psr-4'])) {
      $namespace = key($autoload['psr-4']);
      $vars['name'] = rtrim(str_replace('\\', '.', $namespace), '.');
    }
    return $vars;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
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.
TYPO3FlowInstaller::$locations protected property Overrides BaseInstaller::$locations
TYPO3FlowInstaller::inflectPackageVars public function Modify the package name to be a TYPO3 Flow style key. Overrides BaseInstaller::inflectPackageVars