From b8e1e99c136d6fba493cb9743b619bc1f7626ca7 Mon Sep 17 00:00:00 2001 From: Roger Llopart Pla Date: Wed, 5 Feb 2014 12:06:56 +0100 Subject: [PATCH] Update generic_event.rst The $event['data'] field was not set, thus it wouldn't be modified. Also, the example already had a lowercase string. Uppercased 1 letter. --- components/event_dispatcher/generic_event.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/event_dispatcher/generic_event.rst b/components/event_dispatcher/generic_event.rst index 9018c145577..3be0b9bb876 100644 --- a/components/event_dispatcher/generic_event.rst +++ b/components/event_dispatcher/generic_event.rst @@ -93,7 +93,7 @@ Filtering data:: use Symfony\Component\EventDispatcher\GenericEvent; - $event = new GenericEvent($subject, array('data' => 'foo')); + $event = new GenericEvent($subject, array('data' => 'Foo')); $dispatcher->dispatch('foo', $event); echo $event['data']; @@ -102,6 +102,6 @@ Filtering data:: { public function filter(GenericEvent $event) { - strtolower($event['data']); + $event['data'] = strtolower($event['data']); } }