Documentation

VcsDownloader
in package
implements DownloaderInterface, ChangeReportInterface, VcsCapableDownloaderInterface

Tags
author

Jordi Boggiano j.boggiano@seld.be

Interfaces, Classes and Traits

DownloaderInterface
Downloader interface.
ChangeReportInterface
ChangeReport interface.
VcsCapableDownloaderInterface
VCS Capable Downloader interface.

Table of Contents

$config  : Config
$filesystem  : Filesystem
$io  : IOInterface
$process  : ProcessExecutor
__construct()  : mixed
download()  : mixed
Downloads specific package into specific folder.
getInstallationSource()  : string
Returns installation source (either source or dist).
getVcsReference()  : string|null
Gets the VCS Reference for the package at path
remove()  : mixed
Removes specific package from specific folder.
setOutputProgress()  : DownloaderInterface
Download progress information is not available for all VCS downloaders.
update()  : mixed
Updates specific package in specific folder from initial to target version.
cleanChanges()  : mixed
Prompt the user to check if changes should be stashed/removed or the operation aborted
doDownload()  : mixed
Downloads specific package into specific folder.
doUpdate()  : mixed
Updates specific package in specific folder from initial to target version.
getCommitLogs()  : string
Fetches the commit logs between two commits
hasMetadataRepository()  : bool
Checks if VCS metadata repository has been initialized repository example: .git|.svn|.hg
reapplyChanges()  : mixed
Guarantee that no changes have been made to the local copy

Properties

Methods

download()

Downloads specific package into specific folder.

public download(PackageInterface $package, mixed $path) : mixed
Parameters
$package : PackageInterface

package instance

$path : mixed

download path

Return values
mixed

getInstallationSource()

Returns installation source (either source or dist).

public getInstallationSource() : string
Return values
string

"source" or "dist"

getVcsReference()

Gets the VCS Reference for the package at path

public getVcsReference(PackageInterface $package, mixed $path) : string|null
Parameters
$package : PackageInterface

package directory

$path : mixed

package directory

Return values
string|null

reference or null

remove()

Removes specific package from specific folder.

public remove(PackageInterface $package, mixed $path) : mixed
Parameters
$package : PackageInterface

package instance

$path : mixed

download path

Return values
mixed

cleanChanges()

Prompt the user to check if changes should be stashed/removed or the operation aborted

protected cleanChanges(PackageInterface $package, string $path, bool $update) : mixed
Parameters
$package : PackageInterface
$path : string
$update : bool

if true (update) the changes can be stashed and reapplied after an update, if false (remove) the changes should be assumed to be lost if the operation is not aborted

Tags
throws
RuntimeException

in case the operation must be aborted

Return values
mixed

doDownload()

Downloads specific package into specific folder.

protected abstract doDownload(PackageInterface $package, string $path, string $url) : mixed
Parameters
$package : PackageInterface

package instance

$path : string

download path

$url : string

package url

Return values
mixed

doUpdate()

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

protected abstract doUpdate(PackageInterface $initial, PackageInterface $target, string $path, string $url) : mixed
Parameters
$initial : PackageInterface

initial package

$target : PackageInterface

updated package

$path : string

download path

$url : string

package url

Return values
mixed

getCommitLogs()

Fetches the commit logs between two commits

protected abstract getCommitLogs(string $fromReference, string $toReference, string $path) : string
Parameters
$fromReference : string

the source reference

$toReference : string

the target reference

$path : string

the package path

Return values
string

hasMetadataRepository()

Checks if VCS metadata repository has been initialized repository example: .git|.svn|.hg

protected abstract hasMetadataRepository(string $path) : bool
Parameters
$path : string
Return values
bool

reapplyChanges()

Guarantee that no changes have been made to the local copy

protected reapplyChanges(string $path) : mixed
Parameters
$path : string
Tags
throws
RuntimeException

in case the operation must be aborted or the patch does not apply cleanly

Return values
mixed

Search results