| @@ 4-21 (lines=18) @@ | ||
| 1 | <?php |
|
| 2 | namespace Composer\Installers; |
|
| 3 | ||
| 4 | class PimcoreInstaller extends BaseInstaller |
|
| 5 | { |
|
| 6 | protected $locations = array( |
|
| 7 | 'plugin' => 'plugins/{$name}/', |
|
| 8 | ); |
|
| 9 | ||
| 10 | /** |
|
| 11 | * Format package name to CamelCase |
|
| 12 | */ |
|
| 13 | public function inflectPackageVars($vars) |
|
| 14 | { |
|
| 15 | $vars['name'] = strtolower(preg_replace('/(?<=\\w)([A-Z])/', '_\\1', $vars['name'])); |
|
| 16 | $vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']); |
|
| 17 | $vars['name'] = str_replace(' ', '', ucwords($vars['name'])); |
|
| 18 | ||
| 19 | return $vars; |
|
| 20 | } |
|
| 21 | } |
|
| 22 | ||
| @@ 9-32 (lines=24) @@ | ||
| 6 | * |
|
| 7 | * @package Composer\Installers |
|
| 8 | */ |
|
| 9 | class PiwikInstaller extends BaseInstaller |
|
| 10 | { |
|
| 11 | /** |
|
| 12 | * @var array |
|
| 13 | */ |
|
| 14 | protected $locations = array( |
|
| 15 | 'plugin' => 'plugins/{$name}/', |
|
| 16 | ); |
|
| 17 | ||
| 18 | /** |
|
| 19 | * Format package name to CamelCase |
|
| 20 | * @param array $vars |
|
| 21 | * |
|
| 22 | * @return array |
|
| 23 | */ |
|
| 24 | public function inflectPackageVars($vars) |
|
| 25 | { |
|
| 26 | $vars['name'] = strtolower(preg_replace('/(?<=\\w)([A-Z])/', '_\\1', $vars['name'])); |
|
| 27 | $vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']); |
|
| 28 | $vars['name'] = str_replace(' ', '', ucwords($vars['name'])); |
|
| 29 | ||
| 30 | return $vars; |
|
| 31 | } |
|
| 32 | } |
|
| 33 | ||
| @@ 12-32 (lines=21) @@ | ||
| 9 | namespace Composer\Installers; |
|
| 10 | ||
| 11 | ||
| 12 | class YawikInstaller extends BaseInstaller |
|
| 13 | { |
|
| 14 | protected $locations = array( |
|
| 15 | 'module' => 'module/{$name}/', |
|
| 16 | ); |
|
| 17 | ||
| 18 | /** |
|
| 19 | * Format package name to CamelCase |
|
| 20 | * @param array $vars |
|
| 21 | * |
|
| 22 | * @return array |
|
| 23 | */ |
|
| 24 | public function inflectPackageVars($vars) |
|
| 25 | { |
|
| 26 | $vars['name'] = strtolower(preg_replace('/(?<=\\w)([A-Z])/', '_\\1', $vars['name'])); |
|
| 27 | $vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']); |
|
| 28 | $vars['name'] = str_replace(' ', '', ucwords($vars['name'])); |
|
| 29 | ||
| 30 | return $vars; |
|
| 31 | } |
|
| 32 | } |
|