Skip to content

Commit 432f303

Browse files
committed
Add a clarification to the event subscriber section
It's not explicitly clear that a higher priority number means the method is called earlier. Add some verbiage to that effect.
1 parent 672ded5 commit 432f303

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

components/event_dispatcher/introduction.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -456,6 +456,10 @@ indexed by event names and whose values are either the method name to call or
456456
an array composed of the method name to call and a priority. The example
457457
above shows how to register several listener methods for the same event in
458458
subscriber and also shows how to pass the priority of each listener method.
459+
The higher the priority, the earlier the method is called, so in the above
460+
example, when the ``kernel.response`` event is triggered, the methods
461+
``onKernelResponsePre``, ``onKernelResponseMid``, and ``onKernelResponsePost``
462+
are called in that order.
459463

460464
.. index::
461465
single: Event Dispatcher; Stopping event flow

0 commit comments

Comments
 (0)