Documentation

CurlMultiProxy extends AbstractHasDispatcher
in package
implements CurlMultiInterface

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

Table of Contents

Interfaces

CurlMultiInterface
Interface for sending a pool of {@see RequestInterface} objects in parallel

Properties

$eventDispatcher  : EventDispatcherInterface
$groups  : mixed
$handles  : mixed
$maxHandles  : mixed
$queued  : mixed
$selectTimeout  : mixed

Methods

__construct()  : mixed
add()  : CurlMultiInterface
Add a request to the pool.
addSubscriber()  : self
Add an event subscriber to the dispatcher
all()  : array<string|int, mixed>
Get an array of attached {@see RequestInterface} objects
count()  : mixed
dispatch()  : Event
Helper to dispatch Guzzle events and set the event name on the event
getAllEvents()  : array<string|int, mixed>
Get a list of all of the events emitted from the class
getEventDispatcher()  : EventDispatcherInterface
Get the EventDispatcher of the request
remove()  : bool
Remove a request from the pool.
reset()  : mixed
Reset the state and remove any attached RequestInterface objects
send()  : mixed
Send a pool of {@see RequestInterface} requests.
setEventDispatcher()  : self
Set the EventDispatcher of the request
cleanupHandles()  : mixed
Trims down unused CurlMulti handles to limit the number of open connections
getAvailableHandle()  : CurlMulti
Get an existing available CurlMulti handle or create a new one

Properties

Methods

__construct()

public __construct([int $maxHandles = 3 ][, float $selectTimeout = 1.0 ]) : mixed
Parameters
$maxHandles : int = 3

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

$selectTimeout : float = 1.0

timeout for curl_multi_select

all()

Get an array of attached {@see RequestInterface} objects

public all() : array<string|int, mixed>
Return values
array<string|int, mixed>

count()

public count() : mixed
Attributes
#[ReturnTypeWillChange]

dispatch()

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

public dispatch(mixed $eventName[, array<string|int, mixed> $context = array() ]) : Event
Parameters
$eventName : mixed

Name of the event to dispatch

$context : array<string|int, mixed> = array()

Context of the event

Return values
Event

Returns the created event object

getAllEvents()

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

public static getAllEvents() : array<string|int, mixed>
Return values
array<string|int, mixed>

reset()

Reset the state and remove any attached RequestInterface objects

public reset([mixed $hard = false ]) : mixed
Parameters
$hard : mixed = false

Set to true to close and reopen any open multi handles

send()

Send a pool of {@see RequestInterface} requests.

public send() : mixed

cleanupHandles()

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

protected cleanupHandles() : mixed
Loading…
On this page

Search results