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 * @var string
|
Chris@0
|
31 */
|
Chris@0
|
32 const REQUEST = 'kernel.request';
|
Chris@0
|
33
|
Chris@0
|
34 /**
|
Chris@0
|
35 * The EXCEPTION event occurs when an uncaught exception appears.
|
Chris@0
|
36 *
|
Chris@0
|
37 * This event allows you to create a response for a thrown exception or
|
Chris@0
|
38 * to modify the thrown exception.
|
Chris@0
|
39 *
|
Chris@0
|
40 * @Event("Symfony\Component\HttpKernel\Event\GetResponseForExceptionEvent")
|
Chris@0
|
41 *
|
Chris@0
|
42 * @var string
|
Chris@0
|
43 */
|
Chris@0
|
44 const EXCEPTION = 'kernel.exception';
|
Chris@0
|
45
|
Chris@0
|
46 /**
|
Chris@0
|
47 * The VIEW event occurs when the return value of a controller
|
Chris@0
|
48 * is not a Response instance.
|
Chris@0
|
49 *
|
Chris@0
|
50 * This event allows you to create a response for the return value of the
|
Chris@0
|
51 * controller.
|
Chris@0
|
52 *
|
Chris@0
|
53 * @Event("Symfony\Component\HttpKernel\Event\GetResponseForControllerResultEvent")
|
Chris@0
|
54 *
|
Chris@0
|
55 * @var string
|
Chris@0
|
56 */
|
Chris@0
|
57 const VIEW = 'kernel.view';
|
Chris@0
|
58
|
Chris@0
|
59 /**
|
Chris@0
|
60 * The CONTROLLER event occurs once a controller was found for
|
Chris@0
|
61 * handling a request.
|
Chris@0
|
62 *
|
Chris@0
|
63 * This event allows you to change the controller that will handle the
|
Chris@0
|
64 * request.
|
Chris@0
|
65 *
|
Chris@0
|
66 * @Event("Symfony\Component\HttpKernel\Event\FilterControllerEvent")
|
Chris@0
|
67 *
|
Chris@0
|
68 * @var string
|
Chris@0
|
69 */
|
Chris@0
|
70 const CONTROLLER = 'kernel.controller';
|
Chris@0
|
71
|
Chris@0
|
72 /**
|
Chris@0
|
73 * The CONTROLLER_ARGUMENTS event occurs once controller arguments have been resolved.
|
Chris@0
|
74 *
|
Chris@0
|
75 * This event allows you to change the arguments that will be passed to
|
Chris@0
|
76 * the controller.
|
Chris@0
|
77 *
|
Chris@0
|
78 * @Event("Symfony\Component\HttpKernel\Event\FilterControllerArgumentsEvent")
|
Chris@0
|
79 *
|
Chris@0
|
80 * @var string
|
Chris@0
|
81 */
|
Chris@0
|
82 const CONTROLLER_ARGUMENTS = 'kernel.controller_arguments';
|
Chris@0
|
83
|
Chris@0
|
84 /**
|
Chris@0
|
85 * The RESPONSE event occurs once a response was created for
|
Chris@0
|
86 * replying to a request.
|
Chris@0
|
87 *
|
Chris@0
|
88 * This event allows you to modify or replace the response that will be
|
Chris@0
|
89 * replied.
|
Chris@0
|
90 *
|
Chris@0
|
91 * @Event("Symfony\Component\HttpKernel\Event\FilterResponseEvent")
|
Chris@0
|
92 *
|
Chris@0
|
93 * @var string
|
Chris@0
|
94 */
|
Chris@0
|
95 const RESPONSE = 'kernel.response';
|
Chris@0
|
96
|
Chris@0
|
97 /**
|
Chris@0
|
98 * The TERMINATE event occurs once a response was sent.
|
Chris@0
|
99 *
|
Chris@0
|
100 * This event allows you to run expensive post-response jobs.
|
Chris@0
|
101 *
|
Chris@0
|
102 * @Event("Symfony\Component\HttpKernel\Event\PostResponseEvent")
|
Chris@0
|
103 *
|
Chris@0
|
104 * @var string
|
Chris@0
|
105 */
|
Chris@0
|
106 const TERMINATE = 'kernel.terminate';
|
Chris@0
|
107
|
Chris@0
|
108 /**
|
Chris@0
|
109 * The FINISH_REQUEST event occurs when a response was generated for a request.
|
Chris@0
|
110 *
|
Chris@0
|
111 * This event allows you to reset the global and environmental state of
|
Chris@0
|
112 * the application, when it was changed during the request.
|
Chris@0
|
113 *
|
Chris@0
|
114 * @Event("Symfony\Component\HttpKernel\Event\FinishRequestEvent")
|
Chris@0
|
115 *
|
Chris@0
|
116 * @var string
|
Chris@0
|
117 */
|
Chris@0
|
118 const FINISH_REQUEST = 'kernel.finish_request';
|
Chris@0
|
119 }
|