ComposerInstallersTYPO3FlowInstaller

An installer to handle TYPO3 Flow specifics when installing packages.

Defined (1)

The class is defined in the following location(s).

/vendor/composer/installers/src/Composer/Installers/TYPO3FlowInstaller.php  
  1. class TYPO3FlowInstaller extends BaseInstaller 
  2. protected $locations = array( 
  3. 'package' => 'Packages/Application/{$name}/',  
  4. 'framework' => 'Packages/Framework/{$name}/',  
  5. 'plugin' => 'Packages/Plugins/{$name}/',  
  6. 'site' => 'Packages/Sites/{$name}/',  
  7. 'boilerplate' => 'Packages/Boilerplates/{$name}/',  
  8. 'build' => 'Build/{$name}/',  
  9. ); 
  10.  
  11. /** 
  12. * Modify the package name to be a TYPO3 Flow style key. 
  13. * @param array $vars 
  14. * @return array 
  15. */ 
  16. public function inflectPackageVars($vars) 
  17. $autoload = $this->package->getAutoload(); 
  18. if (isset($autoload['psr-0']) && is_array($autoload['psr-0'])) { 
  19. $namespace = key($autoload['psr-0']); 
  20. $vars['name'] = str_replace('\\', '.', $namespace); 
  21. if (isset($autoload['psr-4']) && is_array($autoload['psr-4'])) { 
  22. $namespace = key($autoload['psr-4']); 
  23. $vars['name'] = rtrim(str_replace('\\', '.', $namespace), '.'); 
  24.  
  25. return $vars;