Property | Type | Description | |
---|---|---|---|
$multicurlOptions | array | Set your default multicurl options | |
$options | array | Set your base options that you want to be used with EVERY request. (Can be overridden individually) |
Method | Description | |
---|---|---|
add ( RollingCurl\Request $request ) : |
Add a request to the request queue | |
addMulticurlOptions ( array $multicurlOptions ) : |
Override and add multicurlOptions | |
addOptions ( array $options ) : |
Override and add options | |
clearCompleted ( ) : |
Clear out all completed requests | |
countActive ( ) : integer | ||
countCompleted ( boolean $useArray = false ) : integer | ||
countPending ( ) : integer | ||
delete ( string $url, array $headers = null, array $options = null ) : |
Perform DELETE request | |
execute ( ) : void | Run all queued requests | |
get ( string $url, array $headers = null, array $options = null ) : |
Perform GET request | |
getCallback ( ) : callable | ||
getCompletedRequests ( ) : RollingCurl\Request[] | ||
getHeaders ( ) : array | ||
getIdleCallback ( ) : callable | ||
getMulticurlOptions ( ) : array | ||
getOptions ( ) : array | ||
getSimultaneousLimit ( ) : integer | ||
post ( string $url, array | string $postData = null, array $headers = null, array $options = null ) : |
Perform POST request | |
prunePendingRequestQueue ( ) : |
Removes requests from the queue that have already been processed | |
put ( string $url, null $putData = null, array $headers = null, array $options = null ) : |
Perform PUT request | |
request ( string $url, string $method = "GET", array | string $postData = null, array $headers = null, array $options = null ) : |
Create new Request and add it to the request queue | |
setCallback ( callable $callback ) : |
Define a callable to handle the response. | |
setHeaders ( array $headers ) : |
||
setIdleCallback ( callable $callback ) : |
Define a callable to be called when waiting for responses. | |
setMulticurlOptions ( array $multicurlOptions ) : |
||
setOptions ( array $options ) : |
||
setSimultaneousLimit ( integer $count ) : |
Set the limit for how many cURL requests will be execute simultaneously. |
Method | Description | |
---|---|---|
getNextPendingRequest ( ) : null | RollingCurl\Request | Get the next pending request, or return null | |
getNextPendingRequests ( integer $limit = 1 ) : RollingCurl\Request[] | Return the next $limit pending requests (may return an empty array) | |
prepareRequestOptions ( RollingCurl\Request $request ) : array | Helper function to gather all the curl options: global, inferred, and per request |
public add ( RollingCurl\Request $request ) : |
||
$request | RollingCurl\Request | |
return |
public addMulticurlOptions ( array $multicurlOptions ) : |
||
$multicurlOptions | array | |
return |
public addOptions ( array $options ) : |
||
$options | array | |
return |
public clearCompleted ( ) : |
||
return |
public countCompleted ( boolean $useArray = false ) : integer | ||
$useArray | boolean | count the completedRequests array is true. Otherwise use the global counter. |
return | integer |
public getCompletedRequests ( ) : RollingCurl\Request[] | ||
return | RollingCurl\Request[] |
public prunePendingRequestQueue ( ) : |
||
return |
public setCallback ( callable $callback ) : |
||
$callback | callable | |
return |
public setHeaders ( array $headers ) : |
||
$headers | array | |
return |
public setIdleCallback ( callable $callback ) : |
||
$callback | callable | |
return |
public setMulticurlOptions ( array $multicurlOptions ) : |
||
$multicurlOptions | array | |
return |
public setOptions ( array $options ) : |
||
$options | array | |
return |
public setSimultaneousLimit ( integer $count ) : |
||
$count | integer | |
return |
protected array $multicurlOptions | ||
return | array |
protected array $options | ||
return | array |