MockHandler
in package
implements
Countable
Returns promises that are rejected or fulfilled using a queue of Aws\ResultInterface and Aws\Exception\AwsException objects.
Interfaces, Classes and Traits
- Countable
Table of Contents
- $lastCommand : mixed
- $lastRequest : mixed
- $onFulfilled : mixed
- $onRejected : mixed
- $queue : mixed
- __construct() : mixed
- The passed in value must be an array of {@see Aws\ResultInterface} or {@see AwsException} objects that acts as a queue of results or exceptions to return each time the handler is invoked.
- __invoke() : mixed
- append() : mixed
- Adds one or more variadic ResultInterface or AwsException objects to the queue.
- appendException() : mixed
- Adds one or more \Exception or \Throwable to the queue
- count() : int
- Returns the number of remaining items in the queue.
- getLastCommand() : CommandInterface
- Get the last received command.
- getLastRequest() : RequestInterface
- Get the last received request.
Properties
$lastCommand
private
mixed
$lastCommand
$lastRequest
private
mixed
$lastRequest
$onFulfilled
private
mixed
$onFulfilled
$onRejected
private
mixed
$onRejected
$queue
private
mixed
$queue
Methods
__construct()
The passed in value must be an array of {@see Aws\ResultInterface} or {@see AwsException} objects that acts as a queue of results or exceptions to return each time the handler is invoked.
public
__construct([array<string|int, mixed> $resultOrQueue = [] ][, callable $onFulfilled = null ][, callable $onRejected = null ]) : mixed
Parameters
- $resultOrQueue : array<string|int, mixed> = []
- $onFulfilled : callable = null
-
Callback to invoke when the return value is fulfilled.
- $onRejected : callable = null
-
Callback to invoke when the return value is rejected.
Return values
mixed —__invoke()
public
__invoke(CommandInterface $command, RequestInterface $request) : mixed
Parameters
- $command : CommandInterface
- $request : RequestInterface
Return values
mixed —append()
Adds one or more variadic ResultInterface or AwsException objects to the queue.
public
append() : mixed
Return values
mixed —appendException()
Adds one or more \Exception or \Throwable to the queue
public
appendException() : mixed
Return values
mixed —count()
Returns the number of remaining items in the queue.
public
count() : int
Return values
int —getLastCommand()
Get the last received command.
public
getLastCommand() : CommandInterface
Return values
CommandInterface —getLastRequest()
Get the last received request.
public
getLastRequest() : RequestInterface