class Envelope

A message wrapped in an envelope with items (configurations, markers, .

..).

Methods

__construct(object $message, array $items = [])

No description

static Envelope
wrap(Envelope|object $message)

Wrap a message into an envelope if not already wrapped.

with(EnvelopeItemInterface $item)

No description

withMessage($message)

No description

EnvelopeItemInterface|null
get(string $itemFqcn)

No description

array
all()

No description

object
getMessage()

No description

Details

at line 30
__construct(object $message, array $items = [])

Parameters

object $message
array $items

at line 43
static Envelope wrap(Envelope|object $message)

Wrap a message into an envelope if not already wrapped.

Parameters

Envelope|object $message

Return Value

Envelope

at line 51
Envelope with(EnvelopeItemInterface $item)

Parameters

EnvelopeItemInterface $item

Return Value

Envelope a new Envelope instance with additional item

at line 60
Envelope withMessage($message)

Parameters

$message

Return Value

Envelope

at line 69
EnvelopeItemInterface|null get(string $itemFqcn)

Parameters

string $itemFqcn

Return Value

EnvelopeItemInterface|null

at line 77
array all()

Return Value

array indexed by fqcn

at line 85
object getMessage()

Return Value

object The original message contained in the envelope