MediaWiki master
|
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. | |
getRemoteRpcClient (array $options=[]) | |
Get a Shellbox RPC client with the specified options. | |
getRpcClient (array $options=[]) | |
Get a Shellbox RPC client with 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. | |
This is a service which provides a configured client to access a remote Shellbox installation.
Definition at line 19 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 37 of file ShellboxClientFactory.php.
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 63 of file ShellboxClientFactory.php.
References $url.
MediaWiki\Shell\ShellboxClientFactory::getRemoteRpcClient | ( | array | $options = [] | ) |
Get a Shellbox RPC 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 91 of file ShellboxClientFactory.php.
MediaWiki\Shell\ShellboxClientFactory::getRpcClient | ( | array | $options = [] | ) |
Get a Shellbox RPC client with specified options.
If remote Shellbox is not configured (isEnabled() returns false), a local fallback is returned.
array | $options |
Definition at line 102 of file ShellboxClientFactory.php.
Referenced by RemoteIcuCollation\__construct().
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 49 of file ShellboxClientFactory.php.
const MediaWiki\Shell\ShellboxClientFactory::DEFAULT_TIMEOUT = 10 |
The default request timeout, in seconds.
Definition at line 28 of file ShellboxClientFactory.php.