WordPress at a glance
class is not described

Composer\Installers

CockpitInstaller{} WC 1.0

No Hooks.

Return

null. Nothing.

Usage

$CockpitInstaller = new CockpitInstaller();
// use class methods

Methods

  1. inflectModuleVars($vars)
  2. inflectPackageVars($vars)

Code of CockpitInstaller{} WC 5.2.2

<?php
class CockpitInstaller extends BaseInstaller
{
    protected $locations = array(
        'module' => 'cockpit/modules/addons/{$name}/',
    );

    /**
     * Format module name.
     *
     * Strip `module-` prefix from package name.
     *
     * {@inheritDoc}
     */
    public function inflectPackageVars($vars)
    {
        if ($vars['type'] == 'cockpit-module') {
            return $this->inflectModuleVars($vars);
        }

        return $vars;
    }

    public function inflectModuleVars($vars)
    {
        $vars['name'] = ucfirst(preg_replace('/cockpit-/i', '', $vars['name']));

        return $vars;
    }
}