Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit2ed4789

Browse files
committed
Reword the header regarding the envelope
1 parentc9a625e commit2ed4789

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

‎components/messenger.rst‎

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -86,14 +86,13 @@ that will do the required processing for your message::
8686
}
8787
}
8888

89-
Envelope
90-
--------
89+
Adding Metadata to Messages (Envelopes)
90+
---------------------------------------
9191

92-
The notion of an envelope is a concept that helps add context around the
93-
messages. An envelope is a message and a set of data. From a user's perspective, this
94-
allows you to set some configuration around the message. For example, to set the serialization
95-
groups used when the message goes through the transport layer, wrap your message
96-
in an ``Envelope`` and add some ``SerializerConfiguration``::
92+
If you need to add metadata or some configuration to a message, wrap it with the
93+
:class:`Symfony\\Component\\Messenger\\Envelope` class. For example, to set the
94+
serialization groups used when the message goes through the transport layer, use
95+
the ``SerializerConfiguration`` envelope::
9796

9897
use Symfony\Component\Messenger\Envelope;
9998
use Symfony\Component\Messenger\Transport\Serialization\SerializerConfiguration;
@@ -126,8 +125,7 @@ marker, like this::
126125
public function handle($message, callable $next)
127126
{
128127
// $message here is an `Envelope` object, because this middleware
129-
// implements the EnvelopeAwareInterface interface. Otherwise,
130-
// it would be the "original" message.
128+
// implements the EnvelopeAwareInterface interface.
131129

132130
if (null !== $message->get(ReceivedMessage::class)) {
133131
// Message just has been received...

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp