Skip to content

Commit

Permalink
bug #3541 Update generic_event.rst (Lumbendil)
Browse files Browse the repository at this point in the history
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 d275302
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions components/event_dispatcher/generic_event.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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'];
Expand All @@ -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.