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")
32 const REQUEST = 'kernel.request';
35 * The EXCEPTION event occurs when an uncaught exception appears.
37 * This event allows you to create a response for a thrown exception or
38 * to modify the thrown exception.
40 * @Event("Symfony\Component\HttpKernel\Event\GetResponseForExceptionEvent")
44 const EXCEPTION = 'kernel.exception';
47 * The VIEW event occurs when the return value of a controller
48 * is not a Response instance.
50 * This event allows you to create a response for the return value of the
53 * @Event("Symfony\Component\HttpKernel\Event\GetResponseForControllerResultEvent")
57 const VIEW = 'kernel.view';
60 * The CONTROLLER event occurs once a controller was found for
63 * This event allows you to change the controller that will handle the
66 * @Event("Symfony\Component\HttpKernel\Event\FilterControllerEvent")
70 const CONTROLLER = 'kernel.controller';
73 * The CONTROLLER_ARGUMENTS event occurs once controller arguments have been resolved.
75 * This event allows you to change the arguments that will be passed to
78 * @Event("Symfony\Component\HttpKernel\Event\FilterControllerArgumentsEvent")
82 const CONTROLLER_ARGUMENTS = 'kernel.controller_arguments';
85 * The RESPONSE event occurs once a response was created for
86 * replying to a request.
88 * This event allows you to modify or replace the response that will be
91 * @Event("Symfony\Component\HttpKernel\Event\FilterResponseEvent")
95 const RESPONSE = 'kernel.response';
98 * The TERMINATE event occurs once a response was sent.
100 * This event allows you to run expensive post-response jobs.
102 * @Event("Symfony\Component\HttpKernel\Event\PostResponseEvent")
106 const TERMINATE = 'kernel.terminate';
109 * The FINISH_REQUEST event occurs when a response was generated for a request.
111 * This event allows you to reset the global and environmental state of
112 * the application, when it was changed during the request.
114 * @Event("Symfony\Component\HttpKernel\Event\FinishRequestEvent")
118 const FINISH_REQUEST = 'kernel.finish_request';