You are here

public function Installer::supports in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 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;
}