Composer API
Class

Composer\Repository\Vcs\HgBitbucketDriver

class HgBitbucketDriver extends BitbucketDriver

Methods

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

Constructor.

from VcsDriver
array getComposerInformation(string $identifier)

Return the composer.json file information

from BitbucketDriver
bool hasComposerFile(string $identifier)

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

from VcsDriver
cleanup()

Performs any cleanup necessary as the driver is not longer needed

from VcsDriver
initialize()

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

from BitbucketDriver
string getUrl()

Return the URL of the repository

from BitbucketDriver
string getFileContent(string $file, string $identifier)

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

from BitbucketDriver
DateTime getChangeDate(string $identifier)

Get the changedate for $identifier.

from BitbucketDriver
array getSource(string $identifier)

from BitbucketDriver
array getDist(string $identifier)

from BitbucketDriver
array getTags()

Return list of tags in the repository

from BitbucketDriver
array getBranches()

Return list of branches in the repository

from BitbucketDriver
string getRootIdentifier()

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

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

Checks if this driver can handle a given url

Details

in VcsDriver at line 60
final public __construct(array $repoConfig, IOInterface $io, Config $config, ProcessExecutor $process = null, RemoteFilesystem $remoteFilesystem = null)

Constructor.

Parameters

array $repoConfig The repository configuration
IOInterface $io The IO instance
Config $config The composer configuration
ProcessExecutor $process Process instance, injectable for mocking
RemoteFilesystem $remoteFilesystem Remote Filesystem, injectable for mocking

in BitbucketDriver at line 113
public 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

in VcsDriver at line 129
public 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.

in VcsDriver at line 170
public cleanup()

Performs any cleanup necessary as the driver is not longer needed

in BitbucketDriver at line 47
public initialize()

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

in BitbucketDriver at line 67
public string getUrl()

Return the URL of the repository

Return Value

string

in BitbucketDriver at line 185
public 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

in BitbucketDriver at line 205
public DateTime getChangeDate(string $identifier)

Get the changedate for $identifier.

Parameters

string $identifier

Return Value

DateTime

in BitbucketDriver at line 225
public array getSource(string $identifier)

Parameters

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

Return Value

array With type, url and reference keys.

in BitbucketDriver at line 237
public 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.

in BitbucketDriver at line 256
public array getTags()

Return list of tags in the repository

Return Value

array Tag names as keys, identifiers as values

in BitbucketDriver at line 300
public array getBranches()

Return list of branches in the repository

Return Value

array Branch names as keys, identifiers as values

at line 26
public string getRootIdentifier()

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

Return Value

string Identifier

at line 54
static public 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