From 204c1afe9ad5bc30afd11ba5800c900c825ba45a Mon Sep 17 00:00:00 2001 From: David Buchmann Date: Thu, 21 Mar 2013 10:43:01 +0100 Subject: [PATCH] cleanup event subscriber note --- docs/en/reference/events.rst | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/docs/en/reference/events.rst b/docs/en/reference/events.rst index ca3578cde..517f2ec5b 100644 --- a/docs/en/reference/events.rst +++ b/docs/en/reference/events.rst @@ -99,11 +99,9 @@ array of events it should be subscribed to. .. note:: - If you are familiar with the Symfony2 event manager, note that - the array returned by getSubscribedEvents is different. For - doctrine, the array values must be the event names, and the - names are used as method names that will be called when the - event occurs. + The array to return in the ``getSubscribedEvents`` method is a simple array + with the values being the event names. The subscriber must have a method + that is named exactly like the event. Now when you dispatch an event, any event subscribers will be notified for that event. @@ -413,6 +411,7 @@ A lifecycle event subscriber may looks like this: .. code-block:: php