InMemoryTransport
in package
implements
TransportInterface, ResetInterface
Transport that stays in memory. Useful for testing purpose.
Tags
Table of Contents
Interfaces
- TransportInterface
- ResetInterface
- Provides a way to reset an object to its initial state.
Properties
- $acknowledged : array<string|int, Envelope>
- $nextId : int
- $queue : array<string|int, Envelope>
- $rejected : array<string|int, Envelope>
- $sent : array<string|int, Envelope>
- $serializer : mixed
Methods
- __construct() : mixed
- ack() : void
- {@inheritdoc}
- get() : iterable<string|int, mixed>
- {@inheritdoc}
- getAcknowledged() : array<string|int, Envelope>
- getRejected() : array<string|int, Envelope>
- getSent() : array<string|int, Envelope>
- reject() : void
- {@inheritdoc}
- reset() : mixed
- send() : Envelope
- {@inheritdoc}
- decode() : array<string|int, Envelope>
- encode() : Envelope|array<string|int, mixed>
Properties
$acknowledged
private
array<string|int, Envelope>
$acknowledged
= []
$nextId
private
int
$nextId
= 1
$queue
private
array<string|int, Envelope>
$queue
= []
$rejected
private
array<string|int, Envelope>
$rejected
= []
$sent
private
array<string|int, Envelope>
$sent
= []
$serializer
private
mixed
$serializer
Methods
__construct()
public
__construct([SerializerInterface $serializer = null ]) : mixed
Parameters
- $serializer : SerializerInterface = null
ack()
{@inheritdoc}
public
ack(Envelope $envelope) : void
Parameters
- $envelope : Envelope
get()
{@inheritdoc}
public
get() : iterable<string|int, mixed>
Return values
iterable<string|int, mixed>getAcknowledged()
public
getAcknowledged() : array<string|int, Envelope>
Return values
array<string|int, Envelope>getRejected()
public
getRejected() : array<string|int, Envelope>
Return values
array<string|int, Envelope>getSent()
public
getSent() : array<string|int, Envelope>
Return values
array<string|int, Envelope>reject()
{@inheritdoc}
public
reject(Envelope $envelope) : void
Parameters
- $envelope : Envelope
reset()
public
reset() : mixed
send()
{@inheritdoc}
public
send(Envelope $envelope) : Envelope
Parameters
- $envelope : Envelope
Return values
Envelopedecode()
private
decode(array<string|int, mixed> $messagesEncoded) : array<string|int, Envelope>
Parameters
- $messagesEncoded : array<string|int, mixed>
Return values
array<string|int, Envelope>encode()
private
encode(Envelope $envelope) : Envelope|array<string|int, mixed>
Parameters
- $envelope : Envelope