Documentation

BatchClientInterface

BatchClient allow to sends multiple request and retrieve a Batch Result.

This implementation simply loops over the requests and uses sendRequest with each of them.

Tags
author

Joel Wurtz jwurtz@jolicode.com

Table of Contents

Methods

sendRequests()  : BatchResult
Send several requests.

Methods

sendRequests()

Send several requests.

public sendRequests(array<string|int, RequestInterface$requests) : BatchResult

You may not assume that the requests are executed in a particular order. If the order matters for your application, use sendRequest sequentially.

Parameters
$requests : array<string|int, RequestInterface>

The requests to send

Tags
throws
BatchException

If one or more requests fails. The exception gives access to the BatchResult with a map of request to result for success, request to exception for failures

Return values
BatchResult

Containing one result per request


        
On this page

Search results