Mercurial > hg > isophonics-drupal-site
diff vendor/composer/installers/src/Composer/Installers/PlentymarketsInstaller.php @ 0:4c8ae668cc8c
Initial import (non-working)
author | Chris Cannam |
---|---|
date | Wed, 29 Nov 2017 16:09:58 +0000 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/vendor/composer/installers/src/Composer/Installers/PlentymarketsInstaller.php Wed Nov 29 16:09:58 2017 +0000 @@ -0,0 +1,29 @@ +<?php +namespace Composer\Installers; + +class PlentymarketsInstaller extends BaseInstaller +{ + protected $locations = array( + 'plugin' => '{$name}/' + ); + + /** + * Remove hyphen, "plugin" and format to camelcase + * @param array $vars + * + * @return array + */ + public function inflectPackageVars($vars) + { + $vars['name'] = explode("-", $vars['name']); + foreach ($vars['name'] as $key => $name) { + $vars['name'][$key] = ucfirst($vars['name'][$key]); + if (strcasecmp($name, "Plugin") == 0) { + unset($vars['name'][$key]); + } + } + $vars['name'] = implode("",$vars['name']); + + return $vars; + } +}