ComposerInstallersHuradInstaller

The WooCommerce Multilingual Composer Installers HuradInstaller class.

Defined (1)

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

/vendor/composer/installers/src/Composer/Installers/HuradInstaller.php  
  1. class HuradInstaller extends BaseInstaller 
  2. protected $locations = array( 
  3. 'plugin' => 'plugins/{$name}/',  
  4. 'theme' => 'plugins/{$name}/',  
  5. ); 
  6.  
  7. /** 
  8. * Format package name to CamelCase 
  9. */ 
  10. public function inflectPackageVars($vars) 
  11. $nameParts = explode('/', $vars['name']); 
  12. foreach ($nameParts as &$value) { 
  13. $value = strtolower(preg_replace('/(?<=\\w)([A-Z])/', '_\\1', $value)); 
  14. $value = str_replace(array('-', '_'), ' ', $value); 
  15. $value = str_replace(' ', '', ucwords($value)); 
  16. $vars['name'] = implode('/', $nameParts); 
  17. return $vars;