SDK for PHP 3.x

MockHandler
in package
implements Countable

Returns promises that are rejected or fulfilled using a queue of Aws\ResultInterface and Aws\Exception\AwsException objects.

Table of Contents

Interfaces

Countable

Methods

__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.

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.

append()

Adds one or more variadic ResultInterface or AwsException objects to the queue.

public append() : mixed

appendException()

Adds one or more \Exception or \Throwable to the queue

public appendException() : mixed

count()

Returns the number of remaining items in the queue.

public count() : int
Return values
int
On this page