\Guzzle\Http\CurlCurlMultiProxy

Proxies requests and connections to a pool of internal curl_multi handles. Each recursive call will add requests to the next available CurlMulti handle.

Summary

Methods
Properties
Constants
getAllEvents()
setEventDispatcher()
getEventDispatcher()
dispatch()
addSubscriber()
__construct()
add()
all()
remove()
reset()
send()
count()
No public properties found
No constants found
getAvailableHandle()
cleanupHandles()
$eventDispatcher
$handles
$groups
$queued
$maxHandles
$selectTimeout
N/A
No private methods found
No private properties found
N/A

Properties

$handles

$handles : 

Type

$groups

$groups : 

Type

$queued

$queued : 

Type

$maxHandles

$maxHandles : 

Type

$selectTimeout

$selectTimeout : 

Type

Methods

getAllEvents()

getAllEvents() : array

Get a list of all of the events emitted from the class

Returns

array

dispatch()

dispatch(string  $eventName, array  $context = array()) : \Guzzle\Common\Event

Helper to dispatch Guzzle events and set the event name on the event

Parameters

string $eventName

Name of the event to dispatch

array $context

Context of the event

Returns

\Guzzle\Common\Event

Returns the created event object

__construct()

__construct(integer  $maxHandles = 3, float  $selectTimeout = 1.0) 

Parameters

integer $maxHandles

The maximum number of idle CurlMulti handles to allow to remain open

float $selectTimeout

timeout for curl_multi_select

all()

all() : array

Get an array of attached {@see RequestInterface} objects

Returns

array

remove()

remove(\Guzzle\Http\Message\RequestInterface  $request) : boolean

Remove a request from the pool.

Parameters

\Guzzle\Http\Message\RequestInterface $request

Request to remove

Returns

boolean —

Returns true on success or false on failure

reset()

reset(boolean  $hard = false) 

Reset the state and remove any attached RequestInterface objects

Parameters

boolean $hard

Set to true to close and reopen any open multi handles

send()

send() 

Send a pool of {@see RequestInterface} requests.

count()

count() 

getAvailableHandle()

getAvailableHandle() : \Guzzle\Http\Curl\CurlMulti

Get an existing available CurlMulti handle or create a new one

Returns

\Guzzle\Http\Curl\CurlMulti

cleanupHandles()

cleanupHandles() 

Trims down unused CurlMulti handles to limit the number of open connections