Skip to content

Commit

Permalink
added a sentence about the HttpException::setHeaders method
Browse files Browse the repository at this point in the history
  • Loading branch information
smatyas committed Dec 25, 2015
1 parent cf2fb97 commit 37bdf76
Showing 1 changed file with 4 additions and 2 deletions.
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

0 comments on commit 37bdf76

Please sign in to comment.