File tree 1 file changed +4
-7
lines changed
1 file changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -20,11 +20,6 @@ You can use this to get the value returned by the handler(s)::
20
20
// or get info about all of handlers
21
21
$handledStamps = $envelope->all(HandledStamp::class);
22
22
23
- A :class: `Symfony\\ Component\\ Messenger\\ HandleTrait ` also exists in order to ease
24
- leveraging a Messenger bus for synchronous needs.
25
- The :method: `Symfony\\ Component\\ Messenger\\ HandleTrait::handle ` method ensures
26
- there is exactly one handler registered and returns its result.
27
-
28
23
Working with Command & Query Buses
29
24
----------------------------------
30
25
@@ -36,8 +31,10 @@ buses are central pieces of the application. Read Martin Fowler's
36
31
As queries are usually synchronous and expected to be handled once,
37
32
getting the result from the handler is a common need.
38
33
39
- To avoid boilerplate code, you can leverage the ``HandleTrait `` in any class
40
- that has a ``$messageBus `` property::
34
+ A :class: `Symfony\\ Component\\ Messenger\\ HandleTrait ` exists to get the result
35
+ of the handler when processing synchronously. It also ensures that exactly one
36
+ handler is registered. The ``HandleTrait `` can be used in any class that has a
37
+ ``$messageBus `` property::
41
38
42
39
// src/Action/ListItems.php
43
40
namespace App\Action;
You can’t perform that action at this time.
0 commit comments