interface VcsDriverInterface (View source)

Methods

initialize()

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

array
getComposerInformation(string $identifier)

Return the composer.json file information

string
getFileContent(string $file, string $identifier)

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

getChangeDate(string $identifier)

Get the changedate for $identifier.

string
getRootIdentifier()

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

array
getBranches()

Return list of branches in the repository

array
getTags()

Return list of tags in the repository

array
getDist(string $identifier)

No description

array
getSource(string $identifier)

No description

string
getUrl()

Return the URL of the repository

bool
hasComposerFile(string $identifier)

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

cleanup()

Performs any cleanup necessary as the driver is not longer needed

static bool
supports(IOInterface $io, Config $config, string $url, bool $deep = false)

Checks if this driver can handle a given url

Details

initialize()

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

array getComposerInformation(string $identifier)

Return the composer.json file information

Parameters

string $identifier Any identifier to a specific branch/tag/commit

Return Value

array containing all infos from the composer.json file

string getFileContent(string $file, string $identifier)

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

Parameters

string $file
string $identifier

Return Value

string

DateTime getChangeDate(string $identifier)

Get the changedate for $identifier.

Parameters

string $identifier

Return Value

DateTime

string getRootIdentifier()

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

.)

Return Value

string Identifier

array getBranches()

Return list of branches in the repository

Return Value

array Branch names as keys, identifiers as values

array getTags()

Return list of tags in the repository

Return Value

array Tag names as keys, identifiers as values

array getDist(string $identifier)

Parameters

string $identifier Any identifier to a specific branch/tag/commit

Return Value

array With type, url reference and shasum keys.

array getSource(string $identifier)

Parameters

string $identifier Any identifier to a specific branch/tag/commit

Return Value

array With type, url and reference keys.

string getUrl()

Return the URL of the repository

Return Value

string

bool hasComposerFile(string $identifier)

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

Return Value

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

cleanup()

Performs any cleanup necessary as the driver is not longer needed

static bool supports(IOInterface $io, Config $config, string $url, bool $deep = false)

Checks if this driver can handle a given url

Parameters

IOInterface $io IO instance
Config $config current $config
string $url URL to validate/check
bool $deep unless true, only shallow checks (url matching typically) should be done

Return Value

bool