Permalink
Browse files

bug #3541 Update generic_event.rst (Lumbendil)

This PR was submitted for the master branch but it was merged into the 2.3 branch instead (closes #3541).

Discussion
----------

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.

Commits
-------

029f4e1 Update generic_event.rst
  • Loading branch information...
weaverryan committed Feb 11, 2014
2 parents 73adf8b + b8e1e99 commit d27530241cf75de4846fe9040bc6ce2235b924f3
Showing with 2 additions and 2 deletions.
  1. +2 −2 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']);
}
}

0 comments on commit d275302

Please sign in to comment.