Skip to content
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

5953 use kernel events constants #6591

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
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
3 changes: 2 additions & 1 deletion components/event_dispatcher/container_aware_dispatcher.rst
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ The ``EventSubscriberInterface`` is exactly as you would expect::
public static function getSubscribedEvents()
{
return array(
'kernel.response' => array(
KernelEvents::RESPONSE => array(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please add the correct use statement on line 71

array('onKernelResponsePre', 10),
array('onKernelResponsePost', 0),
),
Expand All @@ -98,3 +98,4 @@ The ``EventSubscriberInterface`` is exactly as you would expect::
// ...
}
}

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this line should be removed

Copy link
Author

@snoek09 snoek09 May 21, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

my editor complained that it was needed; blank line is required after literal block

2 changes: 1 addition & 1 deletion cookbook/event_dispatcher/event_listener.rst
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ listen to the same ``kernel.exception`` event::
{
// return the subscribed events, their methods and priorities
return array(
'kernel.exception' => array(
KernelEvents::EXCEPTION => array(
array('processException', 10),
array('logException', 0),
array('notifyException', -10),
Expand Down
2 changes: 1 addition & 1 deletion create_framework/http_kernel_httpkernel_class.rst
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ only if needed::

public static function getSubscribedEvents()
{
return array('kernel.view' => 'onView');
return array(KernelEvents::VIEW => 'onView');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please add this use statement as well.

}
}

Expand Down