Documentation

CurlMultiInterface extends Countable, HasDispatcherInterface

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

Table of Contents

Constants

ADD_REQUEST  = 'curl_multi.add_request'
BLOCKING  = 'curl_multi.blocking'
MULTI_EXCEPTION  = 'curl_multi.exception'
POLLING_REQUEST  = 'curl_multi.polling_request'
REMOVE_REQUEST  = 'curl_multi.remove_request'

Methods

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
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

Constants

Methods

all()

Get an array of attached {@see RequestInterface} objects

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

dispatch()

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

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

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([bool $hard = false ]) : mixed
Parameters
$hard : bool = false

Set to true to close and reopen any open multi handles


        
On this page

Search results