Composer API
Class

Composer\Downloader\VcsDownloader

abstract class VcsDownloader implements DownloaderInterface, ChangeReportInterface, VcsCapableDownloaderInterface

Methods

__construct(IOInterface $io, Config $config, ProcessExecutor $process = null, Filesystem $fs = null)

string getInstallationSource()

Returns installation source (either source or dist).

download(PackageInterface $package, string $path)

Downloads specific package into specific folder.

update(PackageInterface $initial, PackageInterface $target, string $path)

Updates specific package in specific folder from initial to target version.

remove(PackageInterface $package, string $path)

Removes specific package from specific folder.

DownloaderInterface setOutputProgress(bool $outputProgress)

Download progress information is not available for all VCS downloaders.

string|null getVcsReference(PackageInterface $package, string $path)

Gets the VCS Reference for the package at path

Details

at line 38
public __construct(IOInterface $io, Config $config, ProcessExecutor $process = null, Filesystem $fs = null)

Parameters

IOInterface $io
Config $config
ProcessExecutor $process
Filesystem $fs

at line 49
public string getInstallationSource()

Returns installation source (either source or dist).

Return Value

string "source" or "dist"

at line 57
public download(PackageInterface $package, string $path)

Downloads specific package into specific folder.

Parameters

PackageInterface $package package instance
string $path download path

at line 112
public update(PackageInterface $initial, PackageInterface $target, string $path)

Updates specific package in specific folder from initial to target version.

Parameters

PackageInterface $initial initial package
PackageInterface $target updated package
string $path download path

at line 195
public remove(PackageInterface $package, string $path)

Removes specific package from specific folder.

Parameters

PackageInterface $package package instance
string $path download path

at line 208
public DownloaderInterface setOutputProgress(bool $outputProgress)

Download progress information is not available for all VCS downloaders.

{@inheritDoc}

Parameters

bool $outputProgress

Return Value

DownloaderInterface

at line 216
public string|null getVcsReference(PackageInterface $package, string $path)

Gets the VCS Reference for the package at path

Parameters

PackageInterface $package package directory
string $path package directory

Return Value

string|null reference or null