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

added a sentence about the HttpException::setHeaders method #6076

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
6 changes: 4 additions & 2 deletions components/http_kernel/introduction.rst
Original file line number Diff line number Diff line change
Expand Up @@ -560,7 +560,9 @@ below for more details).
then ``getStatusCode`` and ``getHeaders`` are called on the exception
and used to populate the headers and status code of the ``FlattenException``
object. The idea is that these are used in the next step when creating
the final response.
the final response. If you want to set custom HTTP headers, you can always
use the ``setHeaders`` method on exceptions derived from the
:class:`Symfony\\Component\\HttpKernel\\Exception\\HttpException` class.

3) A controller is executed and passed the flattened exception. The exact
controller to render is passed as a constructor argument to this listener.
Expand Down Expand Up @@ -595,7 +597,7 @@ each event has their own event object:
===================== ================================ ===================================================================================
Name ``KernelEvents`` Constant Argument passed to the listener
===================== ================================ ===================================================================================
kernel.request ``KernelEvents::REQUEST`` :class:`Symfony\\Component\\HttpKernel\\Event\\GetResponseEvent`
kernel.request ``KernelEvents::REQUEST`` :class:`Symfony\\Component\\HttpKernel\\Event\\GetResponseEvent`
kernel.controller ``KernelEvents::CONTROLLER`` :class:`Symfony\\Component\\HttpKernel\\Event\\FilterControllerEvent`
kernel.view ``KernelEvents::VIEW`` :class:`Symfony\\Component\\HttpKernel\\Event\\GetResponseForControllerResultEvent`
kernel.response ``KernelEvents::RESPONSE`` :class:`Symfony\\Component\\HttpKernel\\Event\\FilterResponseEvent`
Expand Down