Envelope
class Envelope
A message wrapped in an envelope with items (configurations, markers, .
..).
Methods
__construct(object $message, array $items = array()) | ||
static Envelope | wrap(Envelope|object $message) Wrap a message into an envelope if not already wrapped. | |
Envelope | with(EnvelopeItemInterface $item) | |
Envelope | withMessage($message) | |
EnvelopeItemInterface|null | get(string $itemFqcn) | |
array | all() | |
object | getMessage() |
Details
__construct(object $message, array $items = array())
Parameters
object | $message | |
array | $items |
static Envelope wrap(Envelope|object $message)
Wrap a message into an envelope if not already wrapped.
Parameters
Envelope|object | $message |
Return Value
Envelope |
Envelope with(EnvelopeItemInterface $item)
Parameters
EnvelopeItemInterface | $item |
Return Value
Envelope | a new Envelope instance with additional item |
Envelope withMessage($message)
Parameters
$message |
Return Value
Envelope |
EnvelopeItemInterface|null get(string $itemFqcn)
Parameters
string | $itemFqcn |
Return Value
EnvelopeItemInterface|null |
array all()
Return Value
array | indexed by fqcn |
object getMessage()
Return Value
object | The original message contained in the envelope |
© 2004–2017 Fabien Potencier
Licensed under the MIT License.
https://api.symfony.com/4.1/Symfony/Component/Messenger/Envelope.html