Composer API
Class

Composer\Downloader\GitDownloader

class GitDownloader extends VcsDownloader implements DvcsDownloaderInterface

Methods

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

string getInstallationSource()

Returns installation source (either source or dist).

from VcsDownloader
download(PackageInterface $package, string $path)

Downloads specific package into specific folder.

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

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

from VcsDownloader
remove(PackageInterface $package, string $path)

Removes specific package from specific folder.

from VcsDownloader
DownloaderInterface setOutputProgress(bool $outputProgress)

Sets whether to output download progress information or not

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

Gets the VCS Reference for the package at path

from VcsDownloader
doDownload(PackageInterface $package, $path, $url)

{@inheritDoc}

doUpdate(PackageInterface $initial, PackageInterface $target, $path, $url)

{@inheritDoc}

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

Checks for changes to the local copy

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

Checks for unpushed changes to a current branch

Details

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

Parameters

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

in VcsDownloader at line 49
public string getInstallationSource()

Returns installation source (either source or dist).

Return Value

string "source" or "dist"

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

Downloads specific package into specific folder.

Parameters

PackageInterface $package package instance
string $path download path

in VcsDownloader 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

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

Removes specific package from specific folder.

Parameters

PackageInterface $package package instance
string $path download path

in VcsDownloader at line 208
public DownloaderInterface setOutputProgress(bool $outputProgress)

Sets whether to output download progress information or not

Parameters

bool $outputProgress

Return Value

DownloaderInterface

in VcsDownloader 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

at line 41
public doDownload(PackageInterface $package, $path, $url)

{@inheritDoc}

Parameters

PackageInterface $package
$path
$url

at line 90
public doUpdate(PackageInterface $initial, PackageInterface $target, $path, $url)

{@inheritDoc}

Parameters

PackageInterface $initial
PackageInterface $target
$path
$url

at line 132
public string|null getLocalChanges(PackageInterface $package, string $path)

Checks for changes to the local copy

Parameters

PackageInterface $package package instance
string $path package directory

Return Value

string|null changes or null

at line 147
public string|null getUnpushedChanges(PackageInterface $package, string $path)

Checks for unpushed changes to a current branch

Parameters

PackageInterface $package package directory
string $path package directory

Return Value

string|null changes or null