Class MockHandler
- Aws\MockHandler implements Countable
- Namespace: Aws
- Located at MockHandler.php
Returns promises that are rejected or fulfilled using a queue of Aws\ResultInterface and Aws\Exception\AwsException objects.
Methods Summary
-
__construct ( array $resultOrQueue = [], callable $onFulfilled = null, callable $onRejected = null )
The passed in value must be an array of
Aws\ResultInterface
orAws\Exception\AwsException
objects that acts as a queue of results or exceptions to return each time the handler is invoked. -
append ( )
Adds one or more variadic ResultInterface or AwsException objects to the queue.
-
appendException ( )
Adds one or more \Exception or \Throwable to the queue
- __invoke ( Aws\CommandInterface $command, Psr\Http\Message\RequestInterface $request )
-
getLastRequest ( )
Get the last received request.
-
getLastCommand ( )
Get the last received command.
- count ( )
Methods Details
__construct ( array $resultOrQueue = [], callable $onFulfilled = null, callable $onRejected = null )
The passed in value must be an array of Aws\ResultInterface
or
Aws\Exception\AwsException
objects that acts as a queue of results or
exceptions to return each time the handler is invoked.
Parameters
array | $resultOrQueue = [] | |
callable | $onFulfilled = null | Callback to invoke when the return value is fulfilled. |
callable | $onRejected = null | Callback to invoke when the return value is rejected. |
append ( )
Adds one or more variadic ResultInterface or AwsException objects to the queue.
appendException ( )
Adds one or more \Exception or \Throwable to the queue
__invoke (
Aws\CommandInterface
$command,
Psr\Http\Message\RequestInterface
$request
)
Psr\Http\Message\RequestInterface
getLastRequest (
)
Aws\CommandInterface
getLastCommand (
)
count ( )
Implementation of
Countable::count()