Chris@0
|
1 <?php
|
Chris@0
|
2
|
Chris@0
|
3 /*
|
Chris@0
|
4 * This file is part of the Symfony package.
|
Chris@0
|
5 *
|
Chris@0
|
6 * (c) Fabien Potencier <fabien@symfony.com>
|
Chris@0
|
7 *
|
Chris@0
|
8 * For the full copyright and license information, please view the LICENSE
|
Chris@0
|
9 * file that was distributed with this source code.
|
Chris@0
|
10 */
|
Chris@0
|
11
|
Chris@0
|
12 namespace Symfony\Component\HttpKernel;
|
Chris@0
|
13
|
Chris@0
|
14 /**
|
Chris@0
|
15 * Contains all events thrown in the HttpKernel component.
|
Chris@0
|
16 *
|
Chris@0
|
17 * @author Bernhard Schussek <bschussek@gmail.com>
|
Chris@0
|
18 */
|
Chris@0
|
19 final class KernelEvents
|
Chris@0
|
20 {
|
Chris@0
|
21 /**
|
Chris@0
|
22 * The REQUEST event occurs at the very beginning of request
|
Chris@0
|
23 * dispatching.
|
Chris@0
|
24 *
|
Chris@0
|
25 * This event allows you to create a response for a request before any
|
Chris@0
|
26 * other code in the framework is executed.
|
Chris@0
|
27 *
|
Chris@0
|
28 * @Event("Symfony\Component\HttpKernel\Event\GetResponseEvent")
|
Chris@0
|
29 */
|
Chris@0
|
30 const REQUEST = 'kernel.request';
|
Chris@0
|
31
|
Chris@0
|
32 /**
|
Chris@0
|
33 * The EXCEPTION event occurs when an uncaught exception appears.
|
Chris@0
|
34 *
|
Chris@0
|
35 * This event allows you to create a response for a thrown exception or
|
Chris@0
|
36 * to modify the thrown exception.
|
Chris@0
|
37 *
|
Chris@0
|
38 * @Event("Symfony\Component\HttpKernel\Event\GetResponseForExceptionEvent")
|
Chris@0
|
39 */
|
Chris@0
|
40 const EXCEPTION = 'kernel.exception';
|
Chris@0
|
41
|
Chris@0
|
42 /**
|
Chris@0
|
43 * The VIEW event occurs when the return value of a controller
|
Chris@0
|
44 * is not a Response instance.
|
Chris@0
|
45 *
|
Chris@0
|
46 * This event allows you to create a response for the return value of the
|
Chris@0
|
47 * controller.
|
Chris@0
|
48 *
|
Chris@0
|
49 * @Event("Symfony\Component\HttpKernel\Event\GetResponseForControllerResultEvent")
|
Chris@0
|
50 */
|
Chris@0
|
51 const VIEW = 'kernel.view';
|
Chris@0
|
52
|
Chris@0
|
53 /**
|
Chris@0
|
54 * The CONTROLLER event occurs once a controller was found for
|
Chris@0
|
55 * handling a request.
|
Chris@0
|
56 *
|
Chris@0
|
57 * This event allows you to change the controller that will handle the
|
Chris@0
|
58 * request.
|
Chris@0
|
59 *
|
Chris@0
|
60 * @Event("Symfony\Component\HttpKernel\Event\FilterControllerEvent")
|
Chris@0
|
61 */
|
Chris@0
|
62 const CONTROLLER = 'kernel.controller';
|
Chris@0
|
63
|
Chris@0
|
64 /**
|
Chris@0
|
65 * The CONTROLLER_ARGUMENTS event occurs once controller arguments have been resolved.
|
Chris@0
|
66 *
|
Chris@0
|
67 * This event allows you to change the arguments that will be passed to
|
Chris@0
|
68 * the controller.
|
Chris@0
|
69 *
|
Chris@0
|
70 * @Event("Symfony\Component\HttpKernel\Event\FilterControllerArgumentsEvent")
|
Chris@0
|
71 */
|
Chris@0
|
72 const CONTROLLER_ARGUMENTS = 'kernel.controller_arguments';
|
Chris@0
|
73
|
Chris@0
|
74 /**
|
Chris@0
|
75 * The RESPONSE event occurs once a response was created for
|
Chris@0
|
76 * replying to a request.
|
Chris@0
|
77 *
|
Chris@0
|
78 * This event allows you to modify or replace the response that will be
|
Chris@0
|
79 * replied.
|
Chris@0
|
80 *
|
Chris@0
|
81 * @Event("Symfony\Component\HttpKernel\Event\FilterResponseEvent")
|
Chris@0
|
82 */
|
Chris@0
|
83 const RESPONSE = 'kernel.response';
|
Chris@0
|
84
|
Chris@0
|
85 /**
|
Chris@0
|
86 * The TERMINATE event occurs once a response was sent.
|
Chris@0
|
87 *
|
Chris@0
|
88 * This event allows you to run expensive post-response jobs.
|
Chris@0
|
89 *
|
Chris@0
|
90 * @Event("Symfony\Component\HttpKernel\Event\PostResponseEvent")
|
Chris@0
|
91 */
|
Chris@0
|
92 const TERMINATE = 'kernel.terminate';
|
Chris@0
|
93
|
Chris@0
|
94 /**
|
Chris@0
|
95 * The FINISH_REQUEST event occurs when a response was generated for a request.
|
Chris@0
|
96 *
|
Chris@0
|
97 * This event allows you to reset the global and environmental state of
|
Chris@0
|
98 * the application, when it was changed during the request.
|
Chris@0
|
99 *
|
Chris@0
|
100 * @Event("Symfony\Component\HttpKernel\Event\FinishRequestEvent")
|
Chris@0
|
101 */
|
Chris@0
|
102 const FINISH_REQUEST = 'kernel.finish_request';
|
Chris@0
|
103 }
|