\GuzzleHttp\HandlerCurlMultiHandler

Returns an asynchronous response using curl_multi_* functions.

When using the CurlMultiHandler, custom curl options can be specified as an associative array of curl option constants mapping to values in the curl key of the provided request options.

Summary

Methods
Properties
Constants
__construct()
__get()
__destruct()
__invoke()
tick()
execute()
$_mh
No constants found
No protected methods found
No protected properties found
N/A
addRequest()
cancel()
processMessages()
timeToNext()
$factory
$selectTimeout
$active
$handles
$delays
$options
N/A

Properties

$_mh

$_mh : resource

Internal use only. Lazy loaded multi-handle.

Type

resource

$selectTimeout

$selectTimeout

$active

$active

$handles

$handles

$delays

$delays

$options

$options

Methods

__construct()

__construct(array  $options = []) : mixed

This handler accepts the following options:

  • handle_factory: An optional factory used to create curl handles
  • select_timeout: Optional timeout (in seconds) to block before timing out while selecting curl handles. Defaults to 1 second.
  • options: An associative array of CURLMOPT_* options and corresponding values for curl_multi_setopt()

Parameters

array $options

Returns

mixed —

__get()

__get(mixed  $name) : mixed

Parameters

mixed $name

Returns

mixed —

__destruct()

__destruct() : mixed

Returns

mixed —

__invoke()

__invoke(\Psr\Http\Message\RequestInterface  $request, array  $options) : mixed

Parameters

\Psr\Http\Message\RequestInterface $request
array $options

Returns

mixed —

tick()

tick() : mixed

Ticks the curl event loop.

Returns

mixed —

execute()

execute() : mixed

Runs until all outstanding connections have completed.

Returns

mixed —

addRequest()

addRequest(array  $entry) : mixed

Parameters

array $entry

Returns

mixed —

cancel()

cancel(int  $id) : bool

Cancels a handle from sending and removes references to it.

Parameters

int $id

Handle ID to cancel and remove.

Returns

bool —

True on success, false on failure.

processMessages()

processMessages() : mixed

Returns

mixed —

timeToNext()

timeToNext() : mixed

Returns

mixed —