function InstallationManager::getInstaller
Returns installer for a specific package type.
Parameters
string $type package type:
Throws
\InvalidArgumentException if installer for provided type is not registered
8 calls to InstallationManager::getInstaller()
- InstallationManager::download in vendor/
composer/ composer/ src/ Composer/ Installer/ InstallationManager.php - Executes download operation.
- InstallationManager::downloadAndExecuteBatch in vendor/
composer/ composer/ src/ Composer/ Installer/ InstallationManager.php - @phpstan-param array<callable(): ?PromiseInterface<void|null>> $cleanupPromises
- InstallationManager::ensureBinariesPresence in vendor/
composer/ composer/ src/ Composer/ Installer/ InstallationManager.php - Install binary for the given package. If the installer associated to this package doesn't handle that function, it'll do nothing.
- InstallationManager::executeBatch in vendor/
composer/ composer/ src/ Composer/ Installer/ InstallationManager.php - @phpstan-param array<callable(): ?PromiseInterface<void|null>> $cleanupPromises
- InstallationManager::getInstallPath in vendor/
composer/ composer/ src/ Composer/ Installer/ InstallationManager.php - Returns the installation path of a package
File
-
vendor/
composer/ composer/ src/ Composer/ Installer/ InstallationManager.php, line 119
Class
- InstallationManager
- Package operation manager.
Namespace
Composer\InstallerCode
public function getInstaller(string $type) : InstallerInterface {
$type = strtolower($type);
if (isset($this->cache[$type])) {
return $this->cache[$type];
}
foreach ($this->installers as $installer) {
if ($installer->supports($type)) {
return $this->cache[$type] = $installer;
}
}
throw new \InvalidArgumentException('Unknown installer type: ' . $type);
}