CommandTransferException
extends MultiTransferException
in package
Exception thrown when transferring commands in parallel
Table of Contents
Properties
- $exceptionForRequest : mixed
- $exceptions : array<string|int, mixed>
- $failedCommands : mixed
- $failedRequests : mixed
- $successfulCommands : mixed
- $successfulRequests : mixed
- $shortMessage : string
Methods
- __construct() : mixed
- add() : mixed
- Add exceptions to the collection
- addFailedCommand() : self
- Add to the array of failed commands
- addFailedRequest() : self
- Add to the array of failed requests
- addFailedRequestWithException() : self
- Add to the array of failed requests and associate with exceptions
- addSuccessfulCommand() : self
- Add to the array of successful commands
- 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
- fromMultiTransferException() : self
- Creates a new CommandTransferException from a MultiTransferException
- getAllCommands() : array<string|int, mixed>
- Get all of the commands in the transfer
- getAllRequests() : array<string|int, mixed>
- Get all of the requests in the transfer
- getExceptionForFailedCommand() : Exception|null
- Get the Exception that caused the given $command to fail
- getExceptionForFailedRequest() : Exception|null
- Get the Exception that caused the given $request to fail
- getFailedCommands() : array<string|int, mixed>
- Get an array of failed commands
- 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
- getSuccessfulCommands() : array<string|int, mixed>
- Get an array of successful commands
- 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
$failedCommands
protected
mixed
$failedCommands
= array()
$failedRequests
protected
mixed
$failedRequests
= array()
$successfulCommands
protected
mixed
$successfulCommands
= 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
addFailedCommand()
Add to the array of failed commands
public
addFailedCommand(CommandInterface $command) : self
Parameters
- $command : CommandInterface
-
Failed command
Return values
selfaddFailedRequest()
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
selfaddSuccessfulCommand()
Add to the array of successful commands
public
addSuccessfulCommand(CommandInterface $command) : self
Parameters
- $command : CommandInterface
-
Successful command
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
intfromMultiTransferException()
Creates a new CommandTransferException from a MultiTransferException
public
static fromMultiTransferException(MultiTransferException $e) : self
Parameters
- $e : MultiTransferException
-
Exception to base a new exception on
Return values
selfgetAllCommands()
Get all of the commands in the transfer
public
getAllCommands() : array<string|int, mixed>
Return values
array<string|int, mixed>getAllRequests()
Get all of the requests in the transfer
public
getAllRequests() : array<string|int, mixed>
Return values
array<string|int, mixed>getExceptionForFailedCommand()
Get the Exception that caused the given $command to fail
public
getExceptionForFailedCommand(CommandInterface $command) : Exception|null
Parameters
- $command : CommandInterface
-
Failed command
Return values
Exception|nullgetExceptionForFailedRequest()
Get the Exception that caused the given $request to fail
public
getExceptionForFailedRequest(RequestInterface $request) : Exception|null
Parameters
- $request : RequestInterface
-
Failed command
Return values
Exception|nullgetFailedCommands()
Get an array of failed commands
public
getFailedCommands() : array<string|int, mixed>
Return values
array<string|int, mixed>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
ExceptiongetIterator()
Allows array-like iteration over the request exceptions
public
getIterator() : ArrayIterator
Return values
ArrayIteratorgetSuccessfulCommands()
Get an array of successful commands
public
getSuccessfulCommands() : array<string|int, mixed>
Return values
array<string|int, mixed>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
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