MediaWiki
REL1_24
|
Class to handle concurrent HTTP requests. More...
Public Member Functions | |
__construct (array $options) | |
__destruct () | |
run (array $req, array $opts=array()) | |
Execute an HTTP(S) request. | |
runMulti (array $reqs, array $opts=array()) | |
Execute a set of HTTP(S) requests concurrently. | |
Protected Member Functions | |
getCurlHandle (array &$req, array $opts=array()) | |
getCurlMulti () | |
Protected Attributes | |
string null | $caBundlePath |
SSL certificates path *. | |
integer | $connTimeout = 10 |
* | |
integer | $maxConnsPerHost = 50 |
* | |
resource | $multiHandle = null |
* | |
integer | $reqTimeout = 300 |
* | |
bool | $usePipelining = false |
* |
Class to handle concurrent HTTP requests.
HTTP request maps are arrays that use the following format:
Definition at line 42 of file MultiHttpClient.php.
MultiHttpClient::__construct | ( | array $ | options | ) |
array | $options |
|
Definition at line 57 of file MultiHttpClient.php.
Definition at line 378 of file MultiHttpClient.php.
MultiHttpClient::getCurlHandle | ( | array &$ | req, |
array $ | opts = array() |
||
) | [protected] |
array | $req | HTTP request map |
array | $opts |
|
Definition at line 242 of file MultiHttpClient.php.
MultiHttpClient::getCurlMulti | ( | ) | [protected] |
Definition at line 366 of file MultiHttpClient.php.
MultiHttpClient::run | ( | array $ | req, |
array $ | opts = array() |
||
) | [final] |
Execute an HTTP(S) request.
This method returns a response map of:
list( $rcode, $rdesc, $rhdrs, $rbody, $rerr ) = $http->run( $req );
array | $req | HTTP request array |
array | $opts |
Definition at line 91 of file MultiHttpClient.php.
MultiHttpClient::runMulti | ( | array $ | reqs, |
array $ | opts = array() |
||
) |
Execute a set of HTTP(S) requests concurrently.
The maps are returned by this method with the 'response' field set to a map of:
list( $rcode, $rdesc, $rhdrs, $rbody, $rerr ) = $req['response'];
All headers in the 'headers' field are normalized to use lower case names. This is true for the request headers and the response headers. Integer-indexed method/URL entries will also be changed to use the corresponding string keys.array | $reqs | Map of HTTP request arrays |
array | $opts |
|
Definition at line 121 of file MultiHttpClient.php.
string null MultiHttpClient::$caBundlePath [protected] |
SSL certificates path *.
Definition at line 44 of file MultiHttpClient.php.
integer MultiHttpClient::$connTimeout = 10 [protected] |
*
Definition at line 45 of file MultiHttpClient.php.
integer MultiHttpClient::$maxConnsPerHost = 50 [protected] |
*
Definition at line 48 of file MultiHttpClient.php.
resource MultiHttpClient::$multiHandle = null [protected] |
*
Definition at line 43 of file MultiHttpClient.php.
integer MultiHttpClient::$reqTimeout = 300 [protected] |
*
Definition at line 46 of file MultiHttpClient.php.
bool MultiHttpClient::$usePipelining = false [protected] |
*
Definition at line 47 of file MultiHttpClient.php.