@@ -135,7 +135,7 @@ A call to the dispatcher's ``addListener()`` method associates any valid
135135PHP callable to an event::
136136
137137 $listener = new AcmeListener();
138- $dispatcher->addListener('acme.action', array($listener, 'onFooAction'));
138+ $dispatcher->addListener('acme.foo. action', array($listener, 'onFooAction'));
139139
140140The ``addListener() `` method takes up to three arguments:
141141
@@ -161,12 +161,12 @@ The ``addListener()`` method takes up to three arguments:
161161
162162 use Symfony\Component\EventDispatcher\Event;
163163
164- $dispatcher->addListener('foo.action', function (Event $event) {
165- // will be executed when the foo.action event is dispatched
164+ $dispatcher->addListener('acme. foo.action', function (Event $event) {
165+ // will be executed when the acme. foo.action event is dispatched
166166 });
167167
168168Once a listener is registered with the dispatcher, it waits until the event
169- is notified. In the above example, when the ``foo.action `` event is dispatched,
169+ is notified. In the above example, when the ``acme. foo.action `` event is dispatched,
170170the dispatcher calls the ``AcmeListener::onFooAction() `` method and passes
171171the ``Event `` object as the single argument::
172172
@@ -216,7 +216,7 @@ determine which instance is passed.
216216 // register your event listener service
217217 $listener = new Definition(\AcmeListener::class);
218218 $listener->addTag('kernel.event_listener', array(
219- 'event' => 'foo.action',
219+ 'event' => 'acme. foo.action',
220220 'method' => 'onFooAction',
221221 ));
222222 $containerBuilder->setDefinition('listener_service_id', $listener);
0 commit comments