Properties

$io

$io : 

Type

$config

$config : 

Type

$rfs

$rfs : 

Type

$filesystem

$filesystem : 

Type

$cache

$cache : 

Type

$outputProgress

$outputProgress : 

Type

$hasSystemUnzip

$hasSystemUnzip : 

Type

$process

$process : 

Type

$lastCacheWrites

$lastCacheWrites : 

Type

$eventDispatcher

$eventDispatcher : 

Type

$hasZipArchive

$hasZipArchive : 

Type

$isWindows

$isWindows : 

Type

$zipArchiveObject

$zipArchiveObject : 

Type

Methods

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

extract()

extract(string  $file, string  $path) 

extract $file to $path

Parameters

string $file

File to extract

string $path

Path where to extract file

getInstallationSource()

getInstallationSource() : string

Returns installation source (either source or dist).

Returns

string —

"source" or "dist"

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

extractWithSystemUnzip()

extractWithSystemUnzip(string  $file, string  $path, boolean  $isLastChance) : boolean

extract $file to $path with "unzip" command

Parameters

string $file

File to extract

string $path

Path where to extract file

boolean $isLastChance

If true it is called as a fallback and should throw an exception

Returns

boolean —

Success status

extractWithZipArchive()

extractWithZipArchive(string  $file, string  $path, boolean  $isLastChance) : boolean

extract $file to $path with ZipArchive

Parameters

string $file

File to extract

string $path

Path where to extract file

boolean $isLastChance

If true it is called as a fallback and should throw an exception

Returns

boolean —

Success status

getErrorMessage()

getErrorMessage(integer  $retval, string  $file) : string

Give a meaningful error message to the user.

Parameters

integer $retval
string $file

Returns

string

getFolderContent()

getFolderContent(string  $dir) : array<mixed,\SplFileInfo>

Returns the folder content, excluding dotfiles

Parameters

string $dir

Directory

Returns

array<mixed,\SplFileInfo>