2 namespace Composer\Installers;
4 class OctoberInstaller extends BaseInstaller
6 protected $locations = array(
7 'module' => 'modules/{$name}/',
8 'plugin' => 'plugins/{$vendor}/{$name}/',
9 'theme' => 'themes/{$name}/'
13 * Format package name.
15 * For package type october-plugin, cut off a trailing '-plugin' if present.
17 * For package type october-theme, cut off a trailing '-theme' if present.
20 public function inflectPackageVars($vars)
22 if ($vars['type'] === 'october-plugin') {
23 return $this->inflectPluginVars($vars);
26 if ($vars['type'] === 'october-theme') {
27 return $this->inflectThemeVars($vars);
33 protected function inflectPluginVars($vars)
35 $vars['name'] = preg_replace('/^oc-|-plugin$/', '', $vars['name']);
40 protected function inflectThemeVars($vars)
42 $vars['name'] = preg_replace('/^oc-|-theme$/', '', $vars['name']);