class GravInstaller in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/composer/installers/src/Composer/Installers/GravInstaller.php \Composer\Installers\GravInstaller
Hierarchy
- class \Composer\Installers\BaseInstaller
- class \Composer\Installers\GravInstaller
Expanded class hierarchy of GravInstaller
1 file declares its use of GravInstaller
- GravInstallerTest.php in vendor/
composer/ installers/ tests/ Composer/ Installers/ Test/ GravInstallerTest.php
File
- vendor/
composer/ installers/ src/ Composer/ Installers/ GravInstaller.php, line 4
Namespace
Composer\InstallersView source
class GravInstaller extends BaseInstaller {
protected $locations = array(
'plugin' => 'user/plugins/{$name}/',
'theme' => 'user/themes/{$name}/',
);
/**
* Format package name
*
* @param array $vars
*
* @return array
*/
public function inflectPackageVars($vars) {
$restrictedWords = implode('|', array_keys($this->locations));
$vars['name'] = strtolower($vars['name']);
$vars['name'] = preg_replace('/^(?:grav-)?(?:(?:' . $restrictedWords . ')-)?(.*?)(?:-(?:' . $restrictedWords . '))?$/ui', '$1', $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. | |
GravInstaller:: |
protected | property |
Overrides BaseInstaller:: |
|
GravInstaller:: |
public | function |
Format package name Overrides BaseInstaller:: |