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