Server IP : 172.67.158.161 / Your IP : 18.188.243.211 Web Server : LiteSpeed System : Linux business53.web-hosting.com 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64 User : giankuin ( 1871) PHP Version : 7.4.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /proc/thread-self/root/home/giankuin/sieuthiweb.com.vn/wp-content/plugins/woocommerce/vendor/composer/installers/src/Composer/Installers/ |
Upload File : |
<?php namespace Composer\Installers; class PxcmsInstaller extends BaseInstaller { protected $locations = array( 'module' => 'app/Modules/{$name}/', 'theme' => 'themes/{$name}/', ); /** * Format package name. * * @param array $vars * * @return array */ public function inflectPackageVars($vars) { if ($vars['type'] === 'pxcms-module') { return $this->inflectModuleVars($vars); } if ($vars['type'] === 'pxcms-theme') { return $this->inflectThemeVars($vars); } return $vars; } /** * For package type pxcms-module, cut off a trailing '-plugin' if present. * * return string */ protected function inflectModuleVars($vars) { $vars['name'] = str_replace('pxcms-', '', $vars['name']); // strip out pxcms- just incase (legacy) $vars['name'] = str_replace('module-', '', $vars['name']); // strip out module- $vars['name'] = preg_replace('/-module$/', '', $vars['name']); // strip out -module $vars['name'] = str_replace('-', '_', $vars['name']); // make -'s be _'s $vars['name'] = ucwords($vars['name']); // make module name camelcased return $vars; } /** * For package type pxcms-module, cut off a trailing '-plugin' if present. * * return string */ protected function inflectThemeVars($vars) { $vars['name'] = str_replace('pxcms-', '', $vars['name']); // strip out pxcms- just incase (legacy) $vars['name'] = str_replace('theme-', '', $vars['name']); // strip out theme- $vars['name'] = preg_replace('/-theme$/', '', $vars['name']); // strip out -theme $vars['name'] = str_replace('-', '_', $vars['name']); // make -'s be _'s $vars['name'] = ucwords($vars['name']); // make module name camelcased return $vars; } }