Documentation

BatchResult
in package

FinalYes

Responses and exceptions returned from parallel request execution.

Tags
author

Márk Sági-Kazár mark.sagikazar@gmail.com

Table of Contents

Properties

$exceptions  : SplObjectStorage<RequestInterface, ClientExceptionInterface>
$responses  : SplObjectStorage<RequestInterface, ResponseInterface>

Methods

__clone()  : mixed
__construct()  : mixed
addException()  : BatchResult
Adds an exception in an immutable way.
addResponse()  : BatchResult
Adds a response in an immutable way.
getExceptionFor()  : ClientExceptionInterface
Returns the exception for a failed request.
getExceptions()  : array<string|int, ClientExceptionInterface>
Returns all exceptions for the unsuccessful requests.
getResponseFor()  : ResponseInterface
Returns the response for a successful request.
getResponses()  : array<string|int, ResponseInterface>
Returns all successful responses.
hasExceptions()  : bool
Checks if there are any unsuccessful requests at all.
hasResponses()  : bool
Checks if there are any successful responses at all.
isFailed()  : bool
Checks if there is an exception for a request, meaning the request failed.
isSuccessful()  : bool
Checks if there is a successful response for a request.

Properties

Methods

hasExceptions()

Checks if there are any unsuccessful requests at all.

public hasExceptions() : bool
Return values
bool

hasResponses()

Checks if there are any successful responses at all.

public hasResponses() : bool
Return values
bool

        
On this page

Search results