From 432f30398db1e897d06ec3850aee0e629c8090a4 Mon Sep 17 00:00:00 2001 From: John Bafford Date: Thu, 7 Mar 2013 19:45:20 -0500 Subject: [PATCH] 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. --- components/event_dispatcher/introduction.rst | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/components/event_dispatcher/introduction.rst b/components/event_dispatcher/introduction.rst index 915317bf254..501f1e9957c 100644 --- a/components/event_dispatcher/introduction.rst +++ b/components/event_dispatcher/introduction.rst @@ -456,6 +456,10 @@ indexed by event names and whose values are either the method name to call or an array composed of the method name to call and a priority. The example above shows how to register several listener methods for the same event in subscriber and also shows how to pass the priority of each listener method. +The higher the priority, the earlier the method is called, so in the above +example, when the ``kernel.response`` event is triggered, the methods +``onKernelResponsePre``, ``onKernelResponseMid``, and ``onKernelResponsePost`` +are called in that order. .. index:: single: Event Dispatcher; Stopping event flow