$io
$io :
Downloaders manager.
__construct(\Composer\IO\IOInterface $io, boolean $preferSource = false, \Composer\Util\Filesystem|null $filesystem = null)
Initializes download manager.
\Composer\IO\IOInterface | $io | The Input Output Interface |
boolean | $preferSource | prefer downloading from source |
\Composer\Util\Filesystem|null | $filesystem | custom Filesystem object |
setPreferSource(boolean $preferSource) : \Composer\Downloader\DownloadManager
Makes downloader prefer source installation over the dist.
boolean | $preferSource | prefer downloading from source |
setPreferDist(boolean $preferDist) : \Composer\Downloader\DownloadManager
Makes downloader prefer dist installation over the source.
boolean | $preferDist | prefer downloading from dist |
setPreferences(array $preferences) : \Composer\Downloader\DownloadManager
Sets fine tuned preference settings for package level source/dist selection.
array | $preferences | array of preferences by package patterns |
setOutputProgress(boolean $outputProgress) : \Composer\Downloader\DownloadManager
Sets whether to output download progress information for all registered downloaders
boolean | $outputProgress |
setDownloader(string $type, \Composer\Downloader\DownloaderInterface $downloader) : \Composer\Downloader\DownloadManager
Sets installer downloader for a specific installation type.
string | $type | installation type |
\Composer\Downloader\DownloaderInterface | $downloader | downloader instance |
getDownloader(string $type) : \Composer\Downloader\DownloaderInterface
Returns downloader for a specific installation type.
string | $type | installation type |
if downloader for provided type is not registered
getDownloaderForInstalledPackage(\Composer\Package\PackageInterface $package) : \Composer\Downloader\DownloaderInterface|null
Returns downloader for already installed package.
\Composer\Package\PackageInterface | $package | package instance |
if package has no installation source specified
if specific downloader used to load package with wrong type
download(\Composer\Package\PackageInterface $package, string $targetDir, boolean $preferSource = null)
Downloads package into target dir.
\Composer\Package\PackageInterface | $package | package instance |
string | $targetDir | target dir |
boolean | $preferSource | prefer installation from source |
if package have no urls to download from
update(\Composer\Package\PackageInterface $initial, \Composer\Package\PackageInterface $target, string $targetDir)
Updates package from initial to target version.
\Composer\Package\PackageInterface | $initial | initial package version |
\Composer\Package\PackageInterface | $target | target package version |
string | $targetDir | target dir |
if initial package is not installed
remove(\Composer\Package\PackageInterface $package, string $targetDir)
Removes package from target dir.
\Composer\Package\PackageInterface | $package | package instance |
string | $targetDir | target dir |
resolvePackageInstallPreference(\Composer\Package\PackageInterface $package) : string
Determines the install preference of a package
\Composer\Package\PackageInterface | $package | package instance |