Methods

initialize()

initialize() 

Initializes the driver (git clone, svn checkout, fetch info etc)

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

getFileContent()

getFileContent(string  $file, string  $identifier) : string

Return the content of $file or null if the file does not exist.

Parameters

string $file
string $identifier

Returns

string

getChangeDate()

getChangeDate(string  $identifier) : \DateTime

Get the changedate for $identifier.

Parameters

string $identifier

Returns

\DateTime

getRootIdentifier()

getRootIdentifier() : string

Return the root identifier (trunk, master, default/tip .

.)

Returns

string —

Identifier

getBranches()

getBranches() : array

Return list of branches in the repository

Returns

array —

Branch names as keys, identifiers as values

getTags()

getTags() : array

Return list of tags in the repository

Returns

array —

Tag names as keys, identifiers as values

getDist()

getDist(string  $identifier) : array

Parameters

string $identifier

Any identifier to a specific branch/tag/commit

Returns

array —

With type, url reference and shasum keys.

getSource()

getSource(string  $identifier) : array

Parameters

string $identifier

Any identifier to a specific branch/tag/commit

Returns

array —

With type, url and reference keys.

getUrl()

getUrl() : string

Return the URL of the repository

Returns

string

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

supports()

supports(\Composer\IO\IOInterface  $io, \Composer\Config  $config, string  $url, boolean  $deep = false) : boolean

Checks if this driver can handle a given url

Parameters

\Composer\IO\IOInterface $io

IO instance

\Composer\Config $config

current $config

string $url

URL to validate/check

boolean $deep

unless true, only shallow checks (url matching typically) should be done

Returns

boolean