class MediaWikiInstaller in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/composer/installers/src/Composer/Installers/MediaWikiInstaller.php \Composer\Installers\MediaWikiInstaller
Hierarchy
- class \Composer\Installers\BaseInstaller
- class \Composer\Installers\MediaWikiInstaller
Expanded class hierarchy of MediaWikiInstaller
1 file declares its use of MediaWikiInstaller
- MediaWikiInstallerTest.php in vendor/
composer/ installers/ tests/ Composer/ Installers/ Test/ MediaWikiInstallerTest.php
File
- vendor/
composer/ installers/ src/ Composer/ Installers/ MediaWikiInstaller.php, line 4
Namespace
Composer\InstallersView source
class MediaWikiInstaller extends BaseInstaller {
protected $locations = array(
'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;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
BaseInstaller:: |
protected | property | ||
BaseInstaller:: |
protected | property | ||
BaseInstaller:: |
public | function | Return the install path based on package type. | 1 |
BaseInstaller:: |
public | function | Gets the installer's locations | 1 |
BaseInstaller:: |
protected | function | Search through a passed paths array for a custom install path. | |
BaseInstaller:: |
protected | function | Replace vars in a path | |
BaseInstaller:: |
public | function | Initializes base installer. | |
MediaWikiInstaller:: |
protected | property |
Overrides BaseInstaller:: |
|
MediaWikiInstaller:: |
protected | function | ||
MediaWikiInstaller:: |
public | function |
Format package name. Overrides BaseInstaller:: |
|
MediaWikiInstaller:: |
protected | function |