Documentation

GitDownloader extends VcsDownloader
in package
implements DvcsDownloaderInterface

Tags
author

Jordi Boggiano j.boggiano@seld.be

Interfaces, Classes and Traits

DvcsDownloaderInterface
DVCS Downloader interface.

Table of Contents

$config  : Config
$filesystem  : Filesystem
$io  : IOInterface
$process  : ProcessExecutor
$gitUtil  : mixed
$hasDiscardedChanges  : mixed
$hasStashedChanges  : mixed
__construct()  : mixed
doDownload()  : mixed
Downloads specific package into specific folder.
doUpdate()  : mixed
Updates specific package in specific folder from initial to target version.
download()  : mixed
Downloads specific package into specific folder.
getInstallationSource()  : string
Returns installation source (either source or dist).
getLocalChanges()  : mixed
{@inheritDoc}
getUnpushedChanges()  : string|null
Checks for unpushed changes to a current branch
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
discardChanges()  : mixed
getCommitLogs()  : string
Fetches the commit logs between two commits
getShortHash()  : mixed
hasMetadataRepository()  : bool
Checks if VCS metadata repository has been initialized repository example: .git|.svn|.hg
normalizePath()  : mixed
reapplyChanges()  : mixed
Guarantee that no changes have been made to the local copy
setPushUrl()  : mixed
stashChanges()  : mixed
updateOriginUrl()  : mixed
updateToCommit()  : null|string
Updates the given path to the given commit ref
viewDiff()  : mixed

Properties

$hasDiscardedChanges

private mixed $hasDiscardedChanges = false

Methods

doDownload()

Downloads specific package into specific folder.

public doDownload(PackageInterface $package, mixed $path, mixed $url) : mixed
Parameters
$package : PackageInterface

package instance

$path : mixed

download path

$url : mixed

package url

Return values
mixed —

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"

getUnpushedChanges()

Checks for unpushed changes to a current branch

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

package directory

$path : mixed

package directory

Return values
string|null —

changes or null

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, mixed $path, mixed $update) : mixed
Parameters
$package : PackageInterface
$path : mixed
$update : mixed

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

Return values
mixed —

discardChanges()

protected discardChanges(string $path) : mixed
Parameters
$path : string
Tags
throws
RuntimeException
Return values
mixed —

getCommitLogs()

Fetches the commit logs between two commits

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

the source reference

$toReference : mixed

the target reference

$path : mixed

the package path

Return values
string —

getShortHash()

protected getShortHash(mixed $reference) : mixed
Parameters
$reference : mixed
Return values
mixed —

hasMetadataRepository()

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

protected hasMetadataRepository(mixed $path) : bool
Parameters
$path : mixed
Return values
bool —

normalizePath()

protected normalizePath(mixed $path) : mixed
Parameters
$path : mixed
Return values
mixed —

reapplyChanges()

Guarantee that no changes have been made to the local copy

protected reapplyChanges(mixed $path) : mixed
Parameters
$path : mixed
Return values
mixed —

setPushUrl()

protected setPushUrl(mixed $path, mixed $url) : mixed
Parameters
$path : mixed
$url : mixed
Return values
mixed —

stashChanges()

protected stashChanges(string $path) : mixed
Parameters
$path : string
Tags
throws
RuntimeException
Return values
mixed —

updateOriginUrl()

protected updateOriginUrl(mixed $path, mixed $url) : mixed
Parameters
$path : mixed
$url : mixed
Return values
mixed —

updateToCommit()

Updates the given path to the given commit ref

protected updateToCommit(string $path, string $reference, string $branch, DateTime $date) : null|string
Parameters
$path : string
$reference : string
$branch : string
$date : DateTime
Tags
throws
RuntimeException
Return values
null|string —

if a string is returned, it is the commit reference that was checked out if the original could not be found

viewDiff()

protected viewDiff(string $path) : mixed
Parameters
$path : string
Tags
throws
RuntimeException
Return values
mixed —

Search results