Documentation

CurlMultiHandler
in package

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.

Table of Contents

$_mh  : resource
$active  : mixed
$delays  : mixed
$factory  : CurlFactoryInterface
$handles  : mixed
$options  : mixed
$selectTimeout  : mixed
__construct()  : mixed
This handler accepts the following options:
__destruct()  : mixed
__get()  : mixed
__invoke()  : mixed
execute()  : mixed
Runs until all outstanding connections have completed.
tick()  : mixed
Ticks the curl event loop.
addRequest()  : mixed
cancel()  : bool
Cancels a handle from sending and removes references to it.
processMessages()  : mixed
timeToNext()  : mixed

Properties

Methods

__construct()

This handler accepts the following options:

public __construct([array<string|int, mixed> $options = [] ]) : mixed
  • 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
$options : array<string|int, mixed> = []
Return values
mixed

__get()

public __get(mixed $name) : mixed
Parameters
$name : mixed
Return values
mixed

execute()

Runs until all outstanding connections have completed.

public execute() : mixed
Return values
mixed

tick()

Ticks the curl event loop.

public tick() : mixed
Return values
mixed

addRequest()

private addRequest(array<string|int, mixed> $entry) : mixed
Parameters
$entry : array<string|int, mixed>
Return values
mixed

cancel()

Cancels a handle from sending and removes references to it.

private cancel(int $id) : bool
Parameters
$id : int

Handle ID to cancel and remove.

Return values
bool

True on success, false on failure.

processMessages()

private processMessages() : mixed
Return values
mixed

Search results