Properties

$io

$io : 

Type

$config

$config : 

Type

$rfs

$rfs : 

Type

$filesystem

$filesystem : 

Type

$cache

$cache : 

Type

$outputProgress

$outputProgress : 

Type

$lastCacheWrites

$lastCacheWrites : 

Type

$eventDispatcher

$eventDispatcher : 

Type

Methods

__construct()

__construct(\Composer\IO\IOInterface  $io, \Composer\Config  $config, \Composer\EventDispatcher\EventDispatcher  $eventDispatcher = null, \Composer\Cache  $cache = null, \Composer\Util\RemoteFilesystem  $rfs = null, \Composer\Util\Filesystem  $filesystem = null) 

Constructor.

Parameters

\Composer\IO\IOInterface $io

The IO instance

\Composer\Config $config

The config

\Composer\EventDispatcher\EventDispatcher $eventDispatcher

The event dispatcher

\Composer\Cache $cache

Optional cache instance

\Composer\Util\RemoteFilesystem $rfs

The remote filesystem

\Composer\Util\Filesystem $filesystem

The filesystem

getInstallationSource()

getInstallationSource() : string

Returns installation source (either source or dist).

Returns

string —

"source" or "dist"

download()

download(\Composer\Package\PackageInterface  $package, string  $path,   $output = true) 

Downloads specific package into specific folder.

Parameters

\Composer\Package\PackageInterface $package

package instance

string $path

download path

$output

setOutputProgress()

setOutputProgress(boolean  $outputProgress) : \Composer\Downloader\DownloaderInterface

Sets whether to output download progress information or not

Parameters

boolean $outputProgress

Returns

\Composer\Downloader\DownloaderInterface

update()

update(\Composer\Package\PackageInterface  $initial, \Composer\Package\PackageInterface  $target, string  $path) 

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

Parameters

\Composer\Package\PackageInterface $initial

initial package

\Composer\Package\PackageInterface $target

updated package

string $path

download path

remove()

remove(\Composer\Package\PackageInterface  $package, string  $path,   $output = true) 

Removes specific package from specific folder.

Parameters

\Composer\Package\PackageInterface $package

package instance

string $path

download path

$output

getLocalChanges()

getLocalChanges(\Composer\Package\PackageInterface  $package,   $targetDir) : string|null

Checks for changes to the local copy

Parameters

\Composer\Package\PackageInterface $package

package instance

$targetDir

Throws

\RuntimeException

Returns

string|null —

changes or null

getFileName()

getFileName(\Composer\Package\PackageInterface  $package, string  $path) : string

Gets file name for specific package

Parameters

\Composer\Package\PackageInterface $package

package instance

string $path

download path

Returns

string —

file name

processUrl()

processUrl(\Composer\Package\PackageInterface  $package, string  $url) : string

Process the download url

Parameters

\Composer\Package\PackageInterface $package

package the url is coming from

string $url

download url

Throws

\RuntimeException

If any problem with the url

Returns

string —

url