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.
28 * @Event("Symfony\Component\HttpKernel\Event\GetResponseEvent")
30 const REQUEST = 'kernel.request';
33 * The EXCEPTION event occurs when an uncaught exception appears.
35 * This event allows you to create a response for a thrown exception or
36 * to modify the thrown exception.
38 * @Event("Symfony\Component\HttpKernel\Event\GetResponseForExceptionEvent")
40 const EXCEPTION = 'kernel.exception';
43 * The VIEW event occurs when the return value of a controller
44 * is not a Response instance.
46 * This event allows you to create a response for the return value of the
49 * @Event("Symfony\Component\HttpKernel\Event\GetResponseForControllerResultEvent")
51 const VIEW = 'kernel.view';
54 * The CONTROLLER event occurs once a controller was found for
57 * This event allows you to change the controller that will handle the
60 * @Event("Symfony\Component\HttpKernel\Event\FilterControllerEvent")
62 const CONTROLLER = 'kernel.controller';
65 * The CONTROLLER_ARGUMENTS event occurs once controller arguments have been resolved.
67 * This event allows you to change the arguments that will be passed to
70 * @Event("Symfony\Component\HttpKernel\Event\FilterControllerArgumentsEvent")
72 const CONTROLLER_ARGUMENTS = 'kernel.controller_arguments';
75 * The RESPONSE event occurs once a response was created for
76 * replying to a request.
78 * This event allows you to modify or replace the response that will be
81 * @Event("Symfony\Component\HttpKernel\Event\FilterResponseEvent")
83 const RESPONSE = 'kernel.response';
86 * The TERMINATE event occurs once a response was sent.
88 * This event allows you to run expensive post-response jobs.
90 * @Event("Symfony\Component\HttpKernel\Event\PostResponseEvent")
92 const TERMINATE = 'kernel.terminate';
95 * The FINISH_REQUEST event occurs when a response was generated for a request.
97 * This event allows you to reset the global and environmental state of
98 * the application, when it was changed during the request.
100 * @Event("Symfony\Component\HttpKernel\Event\FinishRequestEvent")
102 const FINISH_REQUEST = 'kernel.finish_request';