Documentation

MultiResponseHandlerInterface

The multi response handler. (Schrödinger's cat state handler)

Table of Contents

Methods

handleResponse()  : RequestInterface|null
This method will be called within a loop in MultiRequest::processStack().

Methods

handleResponse()

This method will be called within a loop in MultiRequest::processStack().

public handleResponse(ResponseInterface $response, RequestInterface $request, int $id, array<string|int, mixed>|null $curl_info) : RequestInterface|null

It may return a RequestInterface object (e.g. as a replacement for a failed request), which then will be re-added to the running queue, otherwise NULL.

Parameters
$response : ResponseInterface

the response

$request : RequestInterface

the original request

$id : int

the request ID (order of outgoing requests)

$curl_info : array<string|int, mixed>|null

curl_info() result for the current request, empty array on curl_info() failure

Return values
RequestInterface|null

an optional replacement request if the previous request failed


        
On this page

Search results