MediaWiki REL1_37
|
This is a service which provides a configured client to access a remote Shellbox installation. More...
Public Member Functions | |
__construct (HttpRequestFactory $requestFactory, $urls, $key) | |
getClient (array $options=[]) | |
Get a Shellbox client with the specified options. | |
isEnabled (?string $service=null) | |
Test whether remote Shellbox is enabled by configuration. | |
Public Attributes | |
const | DEFAULT_TIMEOUT = 10 |
The default request timeout, in seconds. | |
Private Member Functions | |
getUrl (?string $service) | |
Private Attributes | |
string null | $key |
HttpRequestFactory | $requestFactory |
string false null[] null | $urls |
This is a service which provides a configured client to access a remote Shellbox installation.
Definition at line 15 of file ShellboxClientFactory.php.
MediaWiki\Shell\ShellboxClientFactory::__construct | ( | HttpRequestFactory | $requestFactory, |
$urls, | |||
$key | |||
) |
HttpRequestFactory | $requestFactory | The factory which will be used to make HTTP clients. |
(string|false|null)[]|null | $urls The Shellbox base URL mapping | |
string | null | $key | The shared secret key used for HMAC authentication |
Definition at line 33 of file ShellboxClientFactory.php.
References MediaWiki\Shell\ShellboxClientFactory\$key, MediaWiki\Shell\ShellboxClientFactory\$requestFactory, and MediaWiki\Shell\ShellboxClientFactory\$urls.
MediaWiki\Shell\ShellboxClientFactory::getClient | ( | array | $options = [] | ) |
Get a Shellbox client with the specified options.
If remote Shellbox is not configured (isEnabled() returns false), an exception will be thrown.
array | $options | Associative array of options:
|
\RuntimeException
Definition at line 59 of file ShellboxClientFactory.php.
|
private |
Definition at line 74 of file ShellboxClientFactory.php.
MediaWiki\Shell\ShellboxClientFactory::isEnabled | ( | ?string | $service = null | ) |
Test whether remote Shellbox is enabled by configuration.
string | null | $service | Same as the service option for getClient. |
Definition at line 45 of file ShellboxClientFactory.php.
|
private |
Definition at line 21 of file ShellboxClientFactory.php.
Referenced by MediaWiki\Shell\ShellboxClientFactory\__construct().
|
private |
Definition at line 17 of file ShellboxClientFactory.php.
Referenced by MediaWiki\Shell\ShellboxClientFactory\__construct().
|
private |
Definition at line 19 of file ShellboxClientFactory.php.
Referenced by MediaWiki\Shell\ShellboxClientFactory\__construct().
const MediaWiki\Shell\ShellboxClientFactory::DEFAULT_TIMEOUT = 10 |
The default request timeout, in seconds.
Definition at line 24 of file ShellboxClientFactory.php.