File tree Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Expand file tree Collapse file tree 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)::
2020 // or get info about all of handlers
2121 $handledStamps = $envelope->all(HandledStamp::class);
2222
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-
2823Working with Command & Query Buses
2924----------------------------------
3025
@@ -36,8 +31,10 @@ buses are central pieces of the application. Read Martin Fowler's
3631As queries are usually synchronous and expected to be handled once,
3732getting the result from the handler is a common need.
3833
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::
4138
4239 // src/Action/ListItems.php
4340 namespace App\Action;
You can’t perform that action at this time.
0 commit comments