MediaWiki REL1_28
|
Class to handle concurrent HTTP requests. More...
Public Member Functions | |
__construct (array $options) | |
__destruct () | |
run (array $req, array $opts=[]) | |
Execute an HTTP(S) request. | |
runMulti (array $reqs, array $opts=[]) | |
Execute a set of HTTP(S) requests concurrently. | |
Protected Member Functions | |
getCurlHandle (array &$req, array $opts=[]) | |
getCurlMulti () | |
Protected Attributes | |
string null | $caBundlePath |
SSL certificates path | |
integer | $connTimeout = 10 |
integer | $maxConnsPerHost = 50 |
resource | $multiHandle = null |
string null | $proxy |
proxy | |
integer | $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 45 of file MultiHttpClient.php.
MultiHttpClient::__construct | ( | array | $options | ) |
array | $options |
|
Exception |
Definition at line 73 of file MultiHttpClient.php.
MultiHttpClient::__destruct | ( | ) |
Definition at line 423 of file MultiHttpClient.php.
array | $req | HTTP request map |
array | $opts |
|
Exception |
Definition at line 273 of file MultiHttpClient.php.
References $connTimeout, $header, $matches, $name, $proxy, $query, $req, $reqTimeout, $userAgent, $value, as, list, and use.
Referenced by runMulti().
|
protected |
Definition at line 413 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 109 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 139 of file MultiHttpClient.php.
References $batch, $name, $req, $value, as, getCurlHandle(), and getCurlMulti().
Referenced by run().
|
protected |
SSL certificates path
Definition at line 49 of file MultiHttpClient.php.
|
protected |
Definition at line 51 of file MultiHttpClient.php.
Referenced by getCurlHandle().
|
protected |
Definition at line 57 of file MultiHttpClient.php.
|
protected |
Definition at line 47 of file MultiHttpClient.php.
Referenced by getCurlMulti().
|
protected |
|
protected |
Definition at line 53 of file MultiHttpClient.php.
Referenced by getCurlHandle().
|
protected |
Definition at line 55 of file MultiHttpClient.php.
|
protected |
Definition at line 61 of file MultiHttpClient.php.
Referenced by getCurlHandle().