8000 Update generic_event.rst by Lumbendil · Pull Request #3541 · symfony/symfony-docs · GitHub
[go: up one dir, main page]

Skip to content

Update generic_event.rst #3541

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.
  • Loading branch information
Lumbendil committed Feb 5, 2014
commit 029f4e132d69ca6e061e29c58d545c1080b8964a
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