History
in package
implements
Countable, IteratorAggregate
Represents a history container that is required when using the history middleware.
Table of Contents
Interfaces
- Countable
- IteratorAggregate
Methods
- __construct() : mixed
- clear() : mixed
- Flush the history
- count() : int
- finish() : mixed
- Finish adding an entry to the history container.
- getIterator() : mixed
- getLastCommand() : CommandInterface
- Get the last finished command seen by the history container.
- getLastRequest() : RequestInterface
- Get the last finished request seen by the history container.
- getLastReturn() : ResultInterface|AwsException
- Get the last received result or exception.
- start() : string
- Initiate an entry being added to the history.
- toArray() : array<string|int, mixed>
- Converts the history to an array.
Methods
__construct()
public
__construct([int $maxEntries = 10 ]) : mixed
Parameters
- $maxEntries : int = 10
-
Maximum number of entries to store.
clear()
Flush the history
public
clear() : mixed
count()
public
count() : int
Return values
intfinish()
Finish adding an entry to the history container.
public
finish(string $ticket, mixed $result) : mixed
Parameters
- $ticket : string
-
Ticket returned from the start call.
- $result : mixed
-
The result (an exception or AwsResult).
getIterator()
public
getIterator() : mixed
getLastCommand()
Get the last finished command seen by the history container.
public
getLastCommand() : CommandInterface
Tags
Return values
CommandInterfacegetLastRequest()
Get the last finished request seen by the history container.
public
getLastRequest() : RequestInterface
Tags
Return values
RequestInterfacegetLastReturn()
Get the last received result or exception.
public
getLastReturn() : ResultInterface|AwsException
Tags
Return values
ResultInterface|AwsExceptionstart()
Initiate an entry being added to the history.
public
start(CommandInterface $cmd, RequestInterface $req) : string
Parameters
- $cmd : CommandInterface
-
Command be executed.
- $req : RequestInterface
-
Request being sent.
Return values
string —Returns the ticket used to finish the entry.
toArray()
Converts the history to an array.
public
toArray() : array<string|int, mixed>