GitHub
in package
Tags
Table of Contents
- $config : mixed
- $io : mixed
- $process : mixed
- $remoteFilesystem : mixed
- __construct() : mixed
- Constructor.
- authorizeOAuth() : bool
- Attempts to authorize a GitHub domain via OAuth
- authorizeOAuthInteractively() : bool
- Authorizes a GitHub domain interactively via OAuth
- getRateLimit() : array<string|int, mixed>
- Extract ratelimit from response.
- isRateLimited() : bool
- Finds whether a request failed due to rate limiting
Properties
$config
protected
mixed
$config
$io
protected
mixed
$io
$process
protected
mixed
$process
$remoteFilesystem
protected
mixed
$remoteFilesystem
Methods
__construct()
Constructor.
public
__construct(IOInterface $io, Config $config[, ProcessExecutor $process = null ][, RemoteFilesystem $remoteFilesystem = null ]) : mixed
Parameters
- $io : IOInterface
-
The IO instance
- $config : Config
-
The composer configuration
- $process : ProcessExecutor = null
-
Process instance, injectable for mocking
- $remoteFilesystem : RemoteFilesystem = null
-
Remote Filesystem, injectable for mocking
Return values
mixed —authorizeOAuth()
Attempts to authorize a GitHub domain via OAuth
public
authorizeOAuth(string $originUrl) : bool
Parameters
- $originUrl : string
-
The host this GitHub instance is located at
Return values
bool —true on success
authorizeOAuthInteractively()
Authorizes a GitHub domain interactively via OAuth
public
authorizeOAuthInteractively(string $originUrl[, string $message = null ]) : bool
Parameters
- $originUrl : string
-
The host this GitHub instance is located at
- $message : string = null
-
The reason this authorization is required
Tags
Return values
bool —true on success
getRateLimit()
Extract ratelimit from response.
public
getRateLimit(array<string|int, mixed> $headers) : array<string|int, mixed>
Parameters
- $headers : array<string|int, mixed>
-
Headers from Composer\Downloader\TransportException.
Return values
array<string|int, mixed> —Associative array with the keys limit and reset.
isRateLimited()
Finds whether a request failed due to rate limiting
public
isRateLimited(array<string|int, mixed> $headers) : bool
Parameters
- $headers : array<string|int, mixed>
-
Headers from Composer\Downloader\TransportException.