WordPress at a glance
class is not described

Composer\Installers

MayaInstaller{} WC 1.0

No Hooks.

Return

null. Nothing.

Usage

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

Methods

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

Code of MayaInstaller{} WC 5.2.2

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

    /**
     * Format package name.
     *
     * For package type maya-module, cut off a trailing '-module' if present.
     *
     */
    public function inflectPackageVars($vars)
    {
        if ($vars['type'] === 'maya-module') {
            return $this->inflectModuleVars($vars);
        }

        return $vars;
    }

    protected function inflectModuleVars($vars)
    {
        $vars['name'] = preg_replace('/-module$/', '', $vars['name']);
        $vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']);
        $vars['name'] = str_replace(' ', '', ucwords($vars['name']));

        return $vars;
    }
}