MultiTransferException
extends ExceptionCollection
in package
Exception encountered during a multi transfer
Table of Contents
- $exceptionForRequest : mixed
- $exceptions : array<string|int, mixed>
- $failedRequests : mixed
- $successfulRequests : mixed
- $shortMessage : string
- __construct() : mixed
- add() : mixed
- Add exceptions to the collection
- addFailedRequest() : self
- Add to the array of failed requests
- addFailedRequestWithException() : self
- Add to the array of failed requests and associate with exceptions
- addSuccessfulRequest() : self
- Add to the array of successful requests
- containsRequest() : bool
- Check if the exception object contains a request
- count() : int
- Get the total number of request exceptions
- getAllRequests() : array<string|int, mixed>
- Get all of the requests in the transfer
- getExceptionForFailedRequest() : Exception|null
- Get the Exception that caused the given $request to fail
- getFailedRequests() : array<string|int, mixed>
- Get an array of failed requests sent in the multi transfer
- getFirst() : Exception
- Get the first exception in the collection
- getIterator() : ArrayIterator
- Allows array-like iteration over the request exceptions
- getSuccessfulRequests() : array<string|int, mixed>
- Get an array of successful requests sent in the multi transfer
- setExceptions() : self
- Set all of the exceptions
- setFailedRequests() : self
- Set all of the failed requests
- setSuccessfulRequests() : self
- Set all of the successful requests
- getExceptionMessage() : mixed
Properties
$exceptionForRequest
protected
mixed
$exceptionForRequest
= array()
$exceptions
protected
array<string|int, mixed>
$exceptions
= array()
Array of Exceptions
$failedRequests
protected
mixed
$failedRequests
= array()
$successfulRequests
protected
mixed
$successfulRequests
= array()
$shortMessage
private
string
$shortMessage
Succinct exception message not including sub-exceptions
Methods
__construct()
public
__construct([mixed $message = '' ], mixed $code[, Exception $previous = null ]) : mixed
Parameters
- $message : mixed = ''
- $code : mixed
- $previous : Exception = null
Return values
mixed —add()
Add exceptions to the collection
public
add(ExceptionCollection|Exception $e) : mixed
Parameters
- $e : ExceptionCollection|Exception
-
Exception to add
Return values
mixed —addFailedRequest()
Add to the array of failed requests
public
addFailedRequest(RequestInterface $request) : self
Parameters
- $request : RequestInterface
-
Failed request
Return values
self —addFailedRequestWithException()
Add to the array of failed requests and associate with exceptions
public
addFailedRequestWithException(RequestInterface $request, Exception $exception) : self
Parameters
- $request : RequestInterface
-
Failed request
- $exception : Exception
-
Exception to add and associate with
Return values
self —addSuccessfulRequest()
Add to the array of successful requests
public
addSuccessfulRequest(RequestInterface $request) : self
Parameters
- $request : RequestInterface
-
Successful request
Return values
self —containsRequest()
Check if the exception object contains a request
public
containsRequest(RequestInterface $request) : bool
Parameters
- $request : RequestInterface
-
Request to check
Return values
bool —count()
Get the total number of request exceptions
public
count() : int
Return values
int —getAllRequests()
Get all of the requests in the transfer
public
getAllRequests() : array<string|int, mixed>
Return values
array<string|int, mixed> —getExceptionForFailedRequest()
Get the Exception that caused the given $request to fail
public
getExceptionForFailedRequest(RequestInterface $request) : Exception|null
Parameters
- $request : RequestInterface
-
Failed command
Return values
Exception|null —getFailedRequests()
Get an array of failed requests sent in the multi transfer
public
getFailedRequests() : array<string|int, mixed>
Return values
array<string|int, mixed> —getFirst()
Get the first exception in the collection
public
getFirst() : Exception
Return values
Exception —getIterator()
Allows array-like iteration over the request exceptions
public
getIterator() : ArrayIterator
Return values
ArrayIterator —getSuccessfulRequests()
Get an array of successful requests sent in the multi transfer
public
getSuccessfulRequests() : array<string|int, mixed>
Return values
array<string|int, mixed> —setExceptions()
Set all of the exceptions
public
setExceptions(array<string|int, mixed> $exceptions) : self
Parameters
- $exceptions : array<string|int, mixed>
-
Array of exceptions
Return values
self —setFailedRequests()
Set all of the failed requests
public
setFailedRequests(array<string|int, mixed> $requests) : self
Parameters
- $requests : array<string|int, mixed>
Return values
self —setSuccessfulRequests()
Set all of the successful requests
public
setSuccessfulRequests(array<string|int, mixed> $requests) : self
Parameters
- $requests : array<string|int, mixed>
Return values
self —getExceptionMessage()
private
getExceptionMessage(Exception $e, mixed $depth) : mixed
Parameters
- $e : Exception
- $depth : mixed