Documentation

VcsDriver
in package
implements VcsDriverInterface

A driver implementation for driver with authentication interaction.

Tags
author

François Pluchino francois.pluchino@opendisplay.com

Interfaces, Classes and Traits

VcsDriverInterface

Table of Contents

$cache  : Cache
$config  : Config
$infoCache  : array<string|int, mixed>
$io  : IOInterface
$originUrl  : string
$process  : ProcessExecutor
$remoteFilesystem  : RemoteFilesystem
$repoConfig  : array<string|int, mixed>
$url  : string
__construct()  : mixed
Constructor.
cleanup()  : mixed
Performs any cleanup necessary as the driver is not longer needed
getComposerInformation()  : array<string|int, mixed>
Return the composer.json file information
hasComposerFile()  : bool
Return true if the repository has a composer file for a given identifier, false otherwise.
getBaseComposerInformation()  : mixed
getContents()  : mixed
Get the remote content.
getScheme()  : string
Get the https or http protocol depending on SSL support.
shouldCache()  : bool
Returns whether or not the given $identifier should be cached or not.

Properties

$infoCache

protected array<string|int, mixed> $infoCache = array()

$repoConfig

protected array<string|int, mixed> $repoConfig

Methods

__construct()

Constructor.

public final __construct(array<string|int, mixed> $repoConfig, IOInterface $io, Config $config[, ProcessExecutor $process = null ][, RemoteFilesystem $remoteFilesystem = null ]) : mixed
Parameters
$repoConfig : array<string|int, mixed>

The repository configuration

$io : IOInterface

The IO instance

$config : Config

The composer configuration

$process : ProcessExecutor = null

Process instance, injectable for mocking

$remoteFilesystem : RemoteFilesystem = null

Remote Filesystem, injectable for mocking

Return values
mixed

cleanup()

Performs any cleanup necessary as the driver is not longer needed

public cleanup() : mixed
Return values
mixed

getComposerInformation()

Return the composer.json file information

public getComposerInformation(mixed $identifier) : array<string|int, mixed>
Parameters
$identifier : mixed

Any identifier to a specific branch/tag/commit

Return values
array<string|int, mixed>

containing all infos from the composer.json file

hasComposerFile()

Return true if the repository has a composer file for a given identifier, false otherwise.

public hasComposerFile(mixed $identifier) : bool
Parameters
$identifier : mixed

Any identifier to a specific branch/tag/commit

Return values
bool

Whether the repository has a composer file for a given identifier.

getBaseComposerInformation()

protected getBaseComposerInformation(mixed $identifier) : mixed
Parameters
$identifier : mixed
Return values
mixed

getContents()

Get the remote content.

protected getContents(string $url) : mixed
Parameters
$url : string

The URL of content

Return values
mixed

The result

getScheme()

Get the https or http protocol depending on SSL support.

protected getScheme() : string

Call this only if you know that the server supports both.

Return values
string

The correct type of protocol

shouldCache()

Returns whether or not the given $identifier should be cached or not.

protected shouldCache(string $identifier) : bool
Parameters
$identifier : string
Return values
bool

Search results