MediaWiki
1.30.0
|
Class to handle concurrent HTTP requests. More...
Public Member Functions | |
__construct (array $options) | |
__destruct () | |
run (array $req, array $opts=[]) | |
Execute an HTTP(S) request. More... | |
runMulti (array $reqs, array $opts=[]) | |
Execute a set of HTTP(S) requests concurrently. More... | |
setLogger (LoggerInterface $logger) | |
Register a logger. More... | |
Protected Member Functions | |
getCurlHandle (array &$req, array $opts=[]) | |
getCurlMulti () | |
Protected Attributes | |
string null | $caBundlePath |
SSL certificates path More... | |
int | $connTimeout = 10 |
LoggerInterface | $logger |
int | $maxConnsPerHost = 50 |
resource | $multiHandle = null |
string null | $proxy |
proxy More... | |
int | $reqTimeout = 300 |
bool | $usePipelining = false |
string | $userAgent = 'wikimedia/multi-http-client v1.0' |
Class to handle concurrent HTTP requests.
HTTP request maps are arrays that use the following format:
Definition at line 48 of file MultiHttpClient.php.
MultiHttpClient::__construct | ( | array | $options | ) |
array | $options |
|
Exception |
Definition at line 78 of file MultiHttpClient.php.
MultiHttpClient::__destruct | ( | ) |
Definition at line 444 of file MultiHttpClient.php.
array | &$req | HTTP request map |
array | $opts |
|
Exception |
Definition at line 285 of file MultiHttpClient.php.
References $header, $matches, $name, $query, $req, $userAgent, $value, as, list, and use.
Referenced by runMulti().
|
protected |
Definition at line 425 of file MultiHttpClient.php.
References $multiHandle.
Referenced by runMulti().
Execute an HTTP(S) request.
This method returns a response map of:
array | $req | HTTP request array |
array | $opts |
Definition at line 118 of file MultiHttpClient.php.
References runMulti().
Execute a set of HTTP(S) requests concurrently.
The maps are returned by this method with the 'response' field set to a map of:
array | $reqs | Map of HTTP request arrays |
array | $opts |
|
Exception |
Definition at line 148 of file MultiHttpClient.php.
References $batch, $name, $req, $value, as, captcha-old\count, getCurlHandle(), and getCurlMulti().
Referenced by run().
MultiHttpClient::setLogger | ( | LoggerInterface | $logger | ) |
Register a logger.
LoggerInterface | $logger |
Definition at line 440 of file MultiHttpClient.php.
References $logger.
|
protected |
SSL certificates path
Definition at line 52 of file MultiHttpClient.php.
|
protected |
Definition at line 54 of file MultiHttpClient.php.
|
protected |
Definition at line 66 of file MultiHttpClient.php.
Referenced by setLogger().
|
protected |
Definition at line 60 of file MultiHttpClient.php.
|
protected |
Definition at line 50 of file MultiHttpClient.php.
Referenced by getCurlMulti().
|
protected |
proxy
Definition at line 62 of file MultiHttpClient.php.
|
protected |
Definition at line 56 of file MultiHttpClient.php.
|
protected |
Definition at line 58 of file MultiHttpClient.php.
Definition at line 64 of file MultiHttpClient.php.
Referenced by getCurlHandle().