You are here

protected function BaseInstaller::mapCustomInstallPaths in Zircon Profile 8.0

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

Search through a passed paths array for a custom install path.

Parameters

array $paths:

string $name:

string $type:

Return value

string

1 call to BaseInstaller::mapCustomInstallPaths()
BaseInstaller::getInstallPath in vendor/composer/installers/src/Composer/Installers/BaseInstaller.php
Return the install path based on package type.

File

vendor/composer/installers/src/Composer/Installers/BaseInstaller.php, line 121

Class

BaseInstaller

Namespace

Composer\Installers

Code

protected function mapCustomInstallPaths(array $paths, $name, $type) {
  foreach ($paths as $path => $names) {
    if (in_array($name, $names) || in_array('type:' . $type, $names)) {
      return $path;
    }
  }
  return false;
}