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']); } }