2 namespace Composer\Installers;
4 class GravInstaller extends BaseInstaller
6 protected $locations = array(
7 'plugin' => 'user/plugins/{$name}/',
8 'theme' => 'user/themes/{$name}/',
18 public function inflectPackageVars($vars)
20 $restrictedWords = implode('|', array_keys($this->locations));
22 $vars['name'] = strtolower($vars['name']);
23 $vars['name'] = preg_replace('/^(?:grav-)?(?:(?:'.$restrictedWords.')-)?(.*?)(?:-(?:'.$restrictedWords.'))?$/ui',