ComposerInstallersOctoberInstaller

The Simple Calendar Composer Installers OctoberInstaller class.

Defined (1)

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

/vendor/composer/installers/src/Composer/Installers/OctoberInstaller.php  
  1. class OctoberInstaller extends BaseInstaller 
  2. protected $locations = array( 
  3. 'module' => 'modules/{$name}/',  
  4. 'plugin' => 'plugins/{$vendor}/{$name}/',  
  5. 'theme' => 'themes/{$name}/' 
  6. ); 
  7.  
  8. /** 
  9. * Format package name. 
  10. * For package type october-plugin, cut off a trailing '-plugin' if present. 
  11. * For package type october-theme, cut off a trailing '-theme' if present. 
  12. */ 
  13. public function inflectPackageVars($vars) 
  14. if ($vars['type'] === 'october-plugin') { 
  15. return $this->inflectPluginVars($vars); 
  16.  
  17. if ($vars['type'] === 'october-theme') { 
  18. return $this->inflectThemeVars($vars); 
  19.  
  20. return $vars; 
  21.  
  22. protected function inflectPluginVars($vars) 
  23. $vars['name'] = preg_replace('/-plugin$/', '', $vars['name']); 
  24.  
  25. return $vars; 
  26.  
  27. protected function inflectThemeVars($vars) 
  28. $vars['name'] = preg_replace('/-theme$/', '', $vars['name']); 
  29.  
  30. return $vars;