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

Breadcrumb

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

function DownloadManager::getDownloader

Returns downloader for a specific installation type.

Parameters

string $type installation type:

Throws

\InvalidArgumentException if downloader for provided type is not registered

1 call to DownloadManager::getDownloader()
DownloadManager::getDownloaderForPackage in vendor/composer/composer/src/Composer/Downloader/DownloadManager.php
Returns downloader for already installed package.

File

vendor/composer/composer/src/Composer/Downloader/DownloadManager.php, line 117

Class

DownloadManager
Downloaders manager.

Namespace

Composer\Downloader

Code

public function getDownloader(string $type) : DownloaderInterface {
    $type = strtolower($type);
    if (!isset($this->downloaders[$type])) {
        throw new \InvalidArgumentException(sprintf('Unknown downloader type: %s. Available types: %s.', $type, implode(', ', array_keys($this->downloaders))));
    }
    return $this->downloaders[$type];
}

API Navigation

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