Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. InstallationManager.php

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

... See full list

File

vendor/composer/composer/src/Composer/Installer/InstallationManager.php, line 119

Class

InstallationManager
Package operation manager.

Namespace

Composer\Installer

Code

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);
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal