@@ -4,7 +4,7 @@ Symfony Framework Events
4
4
Kernel Events
5
5
-------------
6
6
7
- Each event thrown by the Kernel is a subclass of
7
+ Each event dispatched by the kernel is a subclass of
8
8
:class: `Symfony\\ Component\\ HttpKernel\\ Event\\ KernelEvent `. This means that
9
9
each event has access to the following information:
10
10
@@ -20,10 +20,10 @@ each event has access to the following information:
20
20
21
21
.. _kernel-core-request :
22
22
23
- ``kernel.request `` Event
24
- ~~~~~~~~~~~~~~~~~~~~~~~~
23
+ ``kernel.request ``
24
+ ~~~~~~~~~~~~~~~~~~
25
25
26
- *Event Class *: :class: `Symfony\\ Component\\ HttpKernel\\ Event\\ GetResponseEvent `
26
+ ** Event Class * *: :class: `Symfony\\ Component\\ HttpKernel\\ Event\\ GetResponseEvent `
27
27
28
28
The goal of this event is to either return a ``Response `` object immediately
29
29
or setup variables so that a Controller can be called after the event. Any
@@ -41,10 +41,10 @@ object to match the ``Request`` and determine the Controller name (stored in the
41
41
42
42
Read more on the :ref: `kernel.request event <component-http-kernel-kernel-request >`.
43
43
44
- ``kernel.controller `` Event
45
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~
44
+ ``kernel.controller ``
45
+ ~~~~~~~~~~~~~~~~~~~~~
46
46
47
- *Event Class *: :class: `Symfony\\ Component\\ HttpKernel\\ Event\\ FilterControllerEvent `
47
+ ** Event Class * *: :class: `Symfony\\ Component\\ HttpKernel\\ Event\\ FilterControllerEvent `
48
48
49
49
This event is not used by the FrameworkBundle, but can be an entry point used
50
50
to modify the controller that should be executed::
@@ -64,10 +64,10 @@ to modify the controller that should be executed::
64
64
65
65
Read more on the :ref: `kernel.controller event <component-http-kernel-kernel-controller >`.
66
66
67
- ``kernel.view `` Event
68
- ~~~~~~~~~~~~~~~~~~~~~
67
+ ``kernel.view ``
68
+ ~~~~~~~~~~~~~~~
69
69
70
- *Event Class *: :class: `Symfony\\ Component\\ HttpKernel\\ Event\\ GetResponseForControllerResultEvent `
70
+ ** Event Class * *: :class: `Symfony\\ Component\\ HttpKernel\\ Event\\ GetResponseForControllerResultEvent `
71
71
72
72
This event is not used by the FrameworkBundle, but it can be used to implement
73
73
a view sub-system. This event is called *only * if the Controller does *not *
@@ -85,7 +85,7 @@ method::
85
85
$val = $event->getControllerResult();
86
86
$response = new Response();
87
87
88
- // ... some how customize the Response from the return value
88
+ // ... somehow customize the Response from the return value
89
89
90
90
$event->setResponse($response);
91
91
}
@@ -94,10 +94,10 @@ method::
94
94
95
95
Read more on the :ref: `kernel.view event <component-http-kernel-kernel-view >`.
96
96
97
- ``kernel.response `` Event
98
- ~~~~~~~~~~~~~~~~~~~~~~~~~
97
+ ``kernel.response ``
98
+ ~~~~~~~~~~~~~~~~~~~
99
99
100
- *Event Class *: :class: `Symfony\\ Component\\ HttpKernel\\ Event\\ FilterResponseEvent `
100
+ ** Event Class * *: :class: `Symfony\\ Component\\ HttpKernel\\ Event\\ FilterResponseEvent `
101
101
102
102
The purpose of this event is to allow other systems to modify or replace the
103
103
``Response `` object after its creation::
@@ -128,10 +128,10 @@ The FrameworkBundle registers several listeners:
128
128
129
129
Read more on the :ref: `kernel.response event <component-http-kernel-kernel-response >`.
130
130
131
- ``kernel.terminate `` Event
132
- ~~~~~~~~~~~~~~~~~~~~~~~~~~
131
+ ``kernel.terminate ``
132
+ ~~~~~~~~~~~~~~~~~~~~
133
133
134
- *Event Class *: :class: `Symfony\\ Component\\ HttpKernel\\ Event\\ PostResponseEvent `
134
+ ** Event Class * *: :class: `Symfony\\ Component\\ HttpKernel\\ Event\\ PostResponseEvent `
135
135
136
136
The purpose of this event is to perform "heavier" tasks after the response
137
137
was already served to the client.
@@ -142,10 +142,10 @@ was already served to the client.
142
142
143
143
.. _kernel-kernel.exception :
144
144
145
- ``kernel.exception `` Event
146
- ~~~~~~~~~~~~~~~~~~~~~~~~~~
145
+ ``kernel.exception ``
146
+ ~~~~~~~~~~~~~~~~~~~~
147
147
148
- *Event Class *: :class: `Symfony\\ Component\\ HttpKernel\\ Event\\ GetResponseForExceptionEvent `
148
+ ** Event Class * *: :class: `Symfony\\ Component\\ HttpKernel\\ Event\\ GetResponseForExceptionEvent `
149
149
150
150
The FrameworkBundle registers an
151
151
:class: `Symfony\\ Component\\ HttpKernel\\ EventListener\\ ExceptionListener ` that
0 commit comments