You are here

public function Installer::supports in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/composer/installers/src/Composer/Installers/Installer.php \Composer\Installers\Installer::supports()

File

vendor/composer/installers/src/Composer/Installers/Installer.php, line 108

Class

Installer

Namespace

Composer\Installers

Code

public function supports($packageType) {
  $frameworkType = $this
    ->findFrameworkType($packageType);
  if ($frameworkType === false) {
    return false;
  }
  $locationPattern = $this
    ->getLocationPattern($frameworkType);
  return preg_match('#' . $frameworkType . '-' . $locationPattern . '#', $packageType, $matches) === 1;
}