@@ -241,23 +241,23 @@ will be called after another event - ``kernel.controller`` - is dispatched.
241
241
information is typically placed on the ``Request `` via the ``RouterListener ``).
242
242
This string is then transformed into a PHP callable by doing the following:
243
243
244
- a) The ``AcmeDemoBundle:Default:index `` format of the ``_controller `` key
245
- is changed to another string that contains the full class and method
246
- name of the controller by following the convention used in Symfony2 - e.g.
247
- ``Acme\DemoBundle\Controller\DefaultController::indexAction ``. This transformation
248
- is specific to the :class: `Symfony\\ Bundle\\ FrameworkBundle\\ Controller\\ ControllerResolver `
249
- sub-class used by the Symfony2 Framework.
244
+ #. The ``AcmeDemoBundle:Default:index `` format of the ``_controller `` key
245
+ is changed to another string that contains the full class and method
246
+ name of the controller by following the convention used in Symfony2 - e.g.
247
+ ``Acme\DemoBundle\Controller\DefaultController::indexAction ``. This transformation
248
+ is specific to the :class: `Symfony\\ Bundle\\ FrameworkBundle\\ Controller\\ ControllerResolver `
249
+ sub-class used by the Symfony2 Framework.
250
250
251
- b) A new instance of your controller class is instantiated with no
252
- constructor arguments.
251
+ #. A new instance of your controller class is instantiated with no
252
+ constructor arguments.
253
253
254
- c) If the controller implements :class: `Symfony\\ Component\\ DependencyInjection\\ ContainerAwareInterface `,
255
- ``setContainer `` is called on the controller object and the container
256
- is passed to it. This step is also specific to the :class: `Symfony\\ Bundle\\ FrameworkBundle\\ Controller\\ ControllerResolver `
257
- sub-class used by the Symfony2 Framework.
254
+ #. If the controller implements :class: `Symfony\\ Component\\ DependencyInjection\\ ContainerAwareInterface `,
255
+ ``setContainer `` is called on the controller object and the container
256
+ is passed to it. This step is also specific to the :class: `Symfony\\ Bundle\\ FrameworkBundle\\ Controller\\ ControllerResolver `
257
+ sub-class used by the Symfony2 Framework.
258
258
259
- There are also a few other variations on the above process (e.g. if
260
- you're registering your controllers as services).
259
+ There are also a few other variations on the above process (e.g. if
260
+ you're registering your controllers as services).
261
261
262
262
.. _component-http-kernel-kernel-controller :
263
263
@@ -324,15 +324,15 @@ of arguments that should be passed when executing that callable.
324
324
It then iterates over each of these arguments and uses the following tricks
325
325
to determine which value should be passed for each argument:
326
326
327
- a) If the ``Request `` attributes bag contains a key that matches the name
328
- of the argument, that value is used. For example, if the first argument
329
- to a controller is ``$slug ``, and there is a ``slug `` key in the ``Request ``
330
- ``attributes `` bag, that value is used (and typically this value came
331
- from the ``RouterListener ``).
327
+ #. If the ``Request `` attributes bag contains a key that matches the name
328
+ of the argument, that value is used. For example, if the first argument
329
+ to a controller is ``$slug ``, and there is a ``slug `` key in the ``Request ``
330
+ ``attributes `` bag, that value is used (and typically this value came
331
+ from the ``RouterListener ``).
332
332
333
- b) If the argument in the controller is type-hinted with Symfony's
334
- :class: `Symfony\\ Component\\ HttpFoundation\\ Request ` object, then the
335
- ``Request `` is passed in as the value.
333
+ #. If the argument in the controller is type-hinted with Symfony's
334
+ :class: `Symfony\\ Component\\ HttpFoundation\\ Request ` object, then the
335
+ ``Request `` is passed in as the value.
336
336
337
337
.. _component-http-kernel-calling-controller :
338
338
@@ -527,21 +527,21 @@ below for more details).
527
527
and is called :class: `Symfony\\ Component\\ HttpKernel\\ EventListener\\ ExceptionListener `.
528
528
The listener has several goals:
529
529
530
- 1) The thrown exception is converted into a
531
- :class: `Symfony\\ Component\\ HttpKernel\\ Exception\\ FlattenException `
532
- object, which contains all the information about the request, but which
533
- can be printed and serialized.
534
-
535
- 2) If the original exception implements
536
- :class: `Symfony\\ Component\\ HttpKernel\\ Exception\\ HttpExceptionInterface `,
537
- then ``getStatusCode `` and ``getHeaders `` are called on the exception
538
- and used to populate the headers and status code of the ``FlattenException ``
539
- object. The idea is that these are used in the next step when creating
540
- the final response.
541
-
542
- 3) A controller is executed and passed the flattened exception. The exact
543
- controller to render is passed as a constructor argument to this listener.
544
- This controller will return the final ``Response `` for this error page.
530
+ #. The thrown exception is converted into a
531
+ :class: `Symfony\\ Component\\ HttpKernel\\ Exception\\ FlattenException `
532
+ object, which contains all the information about the request, but which
533
+ can be printed and serialized.
534
+
535
+ #. If the original exception implements
536
+ :class: `Symfony\\ Component\\ HttpKernel\\ Exception\\ HttpExceptionInterface `,
537
+ then ``getStatusCode `` and ``getHeaders `` are called on the exception
538
+ and used to populate the headers and status code of the ``FlattenException ``
539
+ object. The idea is that these are used in the next step when creating
540
+ the final response.
541
+
542
+ #. A controller is executed and passed the flattened exception. The exact
543
+ controller to render is passed as a constructor argument to this listener.
544
+ This controller will return the final ``Response `` for this error page.
545
545
546
546
**ExceptionListener in Security **
547
547
0 commit comments