\Composer\Repository\VcsVcsDriver

A driver implementation for driver with authentication interaction.

Summary

Methods
Properties
Constants
__construct()
getComposerInformation()
hasComposerFile()
cleanup()
No public properties found
No constants found
shouldCache()
getBaseComposerInformation()
getScheme()
getContents()
$url
$originUrl
$repoConfig
$io
$config
$process
$remoteFilesystem
$infoCache
$cache
N/A
No private methods found
No private properties found
N/A

Properties

$url

$url : string

Type

string

$originUrl

$originUrl : string

Type

string

$repoConfig

$repoConfig : array

Type

array

$infoCache

$infoCache : array

Type

array

Methods

__construct()

__construct(array  $repoConfig, \Composer\IO\IOInterface  $io, \Composer\Config  $config, \Composer\Util\ProcessExecutor  $process = null, \Composer\Util\RemoteFilesystem  $remoteFilesystem = null) 

Constructor.

Parameters

array $repoConfig

The repository configuration

\Composer\IO\IOInterface $io

The IO instance

\Composer\Config $config

The composer configuration

\Composer\Util\ProcessExecutor $process

Process instance, injectable for mocking

\Composer\Util\RemoteFilesystem $remoteFilesystem

Remote Filesystem, injectable for mocking

getComposerInformation()

getComposerInformation(string  $identifier) : array

Return the composer.json file information

Parameters

string $identifier

Any identifier to a specific branch/tag/commit

Returns

array —

containing all infos from the composer.json file

hasComposerFile()

hasComposerFile(string  $identifier) : boolean

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

Parameters

string $identifier

Any identifier to a specific branch/tag/commit

Returns

boolean —

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

cleanup()

cleanup() 

Performs any cleanup necessary as the driver is not longer needed

shouldCache()

shouldCache(string  $identifier) : boolean

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

Parameters

string $identifier

Returns

boolean

getBaseComposerInformation()

getBaseComposerInformation(  $identifier) 

Parameters

$identifier

getScheme()

getScheme() : string

Get the https or http protocol depending on SSL support.

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

Returns

string —

The correct type of protocol

getContents()

getContents(string  $url) : mixed

Get the remote content.

Parameters

string $url

The URL of content

Returns

mixed —

The result