WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru
класс не описан

MediaWikiInstaller() WC 1.0

Хуков нет.

Возвращает

Null. Ничего.

Использование

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

Методы

  1. inflectExtensionVars($vars)
  2. inflectExtensionVars($vars)
  3. inflectExtensionVars($vars)
  4. inflectPackageVars($vars)
  5. inflectPackageVars($vars)
  6. inflectPackageVars($vars)
  7. inflectSkinVars($vars)
  8. inflectSkinVars($vars)
  9. inflectSkinVars($vars)

Код MediaWikiInstaller: woocommerce/vendor/composer/installers/src/Composer/Installers/MediaWikiInstaller.php WC 4.3.1

<?php
class MediaWikiInstaller extends BaseInstaller
{
    protected $locations = array(
        'core' => 'core/',
        'extension' => 'extensions/{$name}/',
        'skin' => 'skins/{$name}/',
    );

    /**
     * Format package name.
     *
     * For package type mediawiki-extension, cut off a trailing '-extension' if present and transform
     * to CamelCase keeping existing uppercase chars.
     *
     * For package type mediawiki-skin, cut off a trailing '-skin' if present.
     *
     */
    public function inflectPackageVars($vars)
    {

        if ($vars['type'] === 'mediawiki-extension') {
            return $this->inflectExtensionVars($vars);
        }

        if ($vars['type'] === 'mediawiki-skin') {
            return $this->inflectSkinVars($vars);
        }

        return $vars;
    }

    protected function inflectExtensionVars($vars)
    {
        $vars['name'] = preg_replace('/-extension$/', '', $vars['name']);
        $vars['name'] = str_replace('-', ' ', $vars['name']);
        $vars['name'] = str_replace(' ', '', ucwords($vars['name']));

        return $vars;
    }

    protected function inflectSkinVars($vars)
    {
        $vars['name'] = preg_replace('/-skin$/', '', $vars['name']);

        return $vars;
    }

}