4 * This file is part of the Symfony package.
6 * (c) Fabien Potencier <fabien@symfony.com>
8 * For the full copyright and license information, please view the LICENSE
9 * file that was distributed with this source code.
12 namespace Symfony\Component\HttpKernel;
15 * Contains all events thrown in the HttpKernel component.
17 * @author Bernhard Schussek <bschussek@gmail.com>
19 final class KernelEvents
22 * The REQUEST event occurs at the very beginning of request
25 * This event allows you to create a response for a request before any
26 * other code in the framework is executed. The event listener method
27 * receives a Symfony\Component\HttpKernel\Event\GetResponseEvent
34 const REQUEST = 'kernel.request';
37 * The EXCEPTION event occurs when an uncaught exception appears.
39 * This event allows you to create a response for a thrown exception or
40 * to modify the thrown exception. The event listener method receives
41 * a Symfony\Component\HttpKernel\Event\GetResponseForExceptionEvent
48 const EXCEPTION = 'kernel.exception';
51 * The VIEW event occurs when the return value of a controller
52 * is not a Response instance.
54 * This event allows you to create a response for the return value of the
55 * controller. The event listener method receives a
56 * Symfony\Component\HttpKernel\Event\GetResponseForControllerResultEvent
63 const VIEW = 'kernel.view';
66 * The CONTROLLER event occurs once a controller was found for
69 * This event allows you to change the controller that will handle the
70 * request. The event listener method receives a
71 * Symfony\Component\HttpKernel\Event\FilterControllerEvent instance.
77 const CONTROLLER = 'kernel.controller';
80 * The RESPONSE event occurs once a response was created for
81 * replying to a request.
83 * This event allows you to modify or replace the response that will be
84 * replied. The event listener method receives a
85 * Symfony\Component\HttpKernel\Event\FilterResponseEvent instance.
91 const RESPONSE = 'kernel.response';
94 * The TERMINATE event occurs once a response was sent.
96 * This event allows you to run expensive post-response jobs.
97 * The event listener method receives a
98 * Symfony\Component\HttpKernel\Event\PostResponseEvent instance.
104 const TERMINATE = 'kernel.terminate';
107 * The FINISH_REQUEST event occurs when a response was generated for a request.
109 * This event allows you to reset the global and environmental state of
110 * the application, when it was changed during the request.
111 * The event listener method receives a
112 * Symfony\Component\HttpKernel\Event\FinishRequestEvent instance.
118 const FINISH_REQUEST = 'kernel.finish_request';