MultiTransferException
extends ExceptionCollection
in package
Exception encountered during a multi transfer
Table of Contents
Properties
- $exceptionForRequest : mixed
- $exceptions : array<string|int, mixed>
- $failedRequests : mixed
- $successfulRequests : mixed
- $shortMessage : string
Methods
- __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 = 0 ][, Exception $previous = null ]) : mixed
Parameters
- $message : mixed = ''
- $code : mixed = 0
- $previous : Exception = null
add()
Add exceptions to the collection
public
add(ExceptionCollection|Exception $e) : mixed
Parameters
- $e : ExceptionCollection|Exception
-
Exception to add
Tags
addFailedRequest()
Add to the array of failed requests
public
addFailedRequest(RequestInterface $request) : self
Parameters
- $request : RequestInterface
-
Failed request
Return values
selfaddFailedRequestWithException()
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
selfaddSuccessfulRequest()
Add to the array of successful requests
public
addSuccessfulRequest(RequestInterface $request) : self
Parameters
- $request : RequestInterface
-
Successful request
Return values
selfcontainsRequest()
Check if the exception object contains a request
public
containsRequest(RequestInterface $request) : bool
Parameters
- $request : RequestInterface
-
Request to check
Return values
boolcount()
Get the total number of request exceptions
public
count() : int
Return values
intgetAllRequests()
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|nullgetFailedRequests()
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
ExceptiongetIterator()
Allows array-like iteration over the request exceptions
public
getIterator() : ArrayIterator
Return values
ArrayIteratorgetSuccessfulRequests()
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
selfsetFailedRequests()
Set all of the failed requests
public
setFailedRequests(array<string|int, mixed> $requests) : self
Parameters
- $requests : array<string|int, mixed>
Return values
selfsetSuccessfulRequests()
Set all of the successful requests
public
setSuccessfulRequests(array<string|int, mixed> $requests) : self
Parameters
- $requests : array<string|int, mixed>
Return values
selfgetExceptionMessage()
private
getExceptionMessage(Exception $e[, mixed $depth = 0 ]) : mixed
Parameters
- $e : Exception
- $depth : mixed = 0