Envelope
in package
FinalYes
A message wrapped in an envelope with stamps (configurations, markers, ...).
Tags
Table of Contents
Properties
- $message : object
- $stamps : array<string, array<int, StampInterface>>
Methods
- __construct() : mixed
- all() : array<string|int, StampInterface>|array<string|int, array<string|int, StampInterface>>
- getMessage() : object
- last() : StampInterface|null
- with() : static
- Adds one or more stamps.
- withoutAll() : static
- Removes all stamps of the given class.
- withoutStampsOfType() : self
- Removes all stamps that implement the given type.
- wrap() : self
- Makes sure the message is in an Envelope and adds the given stamps.
Properties
$message
private
object
$message
$stamps
private
array<string, array<int, StampInterface>>
$stamps
= []
Methods
__construct()
public
__construct(object|Envelope $message[, array<string|int, StampInterface> $stamps = [] ]) : mixed
Parameters
- $message : object|Envelope
- $stamps : array<string|int, StampInterface> = []
all()
public
all([string $stampFqcn = null ]) : array<string|int, StampInterface>|array<string|int, array<string|int, StampInterface>>
Parameters
- $stampFqcn : string = null
Return values
array<string|int, StampInterface>|array<string|int, array<string|int, StampInterface>> —The stamps for the specified FQCN, or all stamps by their class name
getMessage()
public
getMessage() : object
Return values
objectlast()
public
last(string $stampFqcn) : StampInterface|null
Parameters
- $stampFqcn : string
Return values
StampInterface|nullwith()
Adds one or more stamps.
public
with(StampInterface ...$stamps) : static
Parameters
- $stamps : StampInterface
Return values
staticwithoutAll()
Removes all stamps of the given class.
public
withoutAll(string $stampFqcn) : static
Parameters
- $stampFqcn : string
Return values
staticwithoutStampsOfType()
Removes all stamps that implement the given type.
public
withoutStampsOfType(string $type) : self
Parameters
- $type : string
Return values
selfwrap()
Makes sure the message is in an Envelope and adds the given stamps.
public
static wrap(object $message[, array<string|int, StampInterface> $stamps = [] ]) : self
Parameters
- $message : object
- $stamps : array<string|int, StampInterface> = []