class GitHub (View source)

Properties

protected $io
protected $config
protected $process
protected $remoteFilesystem

Methods

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

Constructor.

bool
authorizeOAuth(string $originUrl)

Attempts to authorize a GitHub domain via OAuth

bool
authorizeOAuthInteractively(string $originUrl, string $message = null)

Authorizes a GitHub domain interactively via OAuth

Details

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

Constructor.

Parameters

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

bool authorizeOAuth(string $originUrl)

Attempts to authorize a GitHub domain via OAuth

Parameters

string $originUrl The host this GitHub instance is located at

Return Value

bool true on success

bool authorizeOAuthInteractively(string $originUrl, string $message = null)

Authorizes a GitHub domain interactively via OAuth

Parameters

string $originUrl The host this GitHub instance is located at
string $message The reason this authorization is required

Return Value

bool true on success

Exceptions

RuntimeException
Exception