protected function Installer::getLocationPattern in Zircon Profile 8.0
Same name and namespace in other branches
- 8 vendor/composer/installers/src/Composer/Installers/Installer.php \Composer\Installers\Installer::getLocationPattern()
Get the second part of the regular expression to check for support of a package type
Parameters
string $frameworkType:
Return value
string
1 call to Installer::getLocationPattern()
- Installer::supports in vendor/
composer/ installers/ src/ Composer/ Installers/ Installer.php
File
- vendor/
composer/ installers/ src/ Composer/ Installers/ Installer.php, line 150
Class
Namespace
Composer\InstallersCode
protected function getLocationPattern($frameworkType) {
$pattern = false;
if (!empty($this->supportedTypes[$frameworkType])) {
$frameworkClass = 'Composer\\Installers\\' . $this->supportedTypes[$frameworkType];
/** @var BaseInstaller $framework */
$framework = new $frameworkClass(null, $this->composer);
$locations = array_keys($framework
->getLocations());
$pattern = $locations ? '(' . implode('|', $locations) . ')' : false;
}
return $pattern ?: '(\\w+)';
}