@@ -256,11 +256,11 @@ on the request's information.
256
256
information is typically placed on the ``Request `` via the ``RouterListener ``).
257
257
This string is then transformed into a PHP callable by doing the following:
258
258
259
- a) The `` AcmeDemoBundle:Default:index `` format of the `` _controller `` key
260
- is changed to another string that contains the full class and method
261
- name of the controller by following the convention used in Symfony - e.g.
262
- ``Acme\DemoBundle \Controller\DefaultController::indexAction ``. This transformation
263
- is specific to the :class: `Symfony\\ Bundle\\ FrameworkBundle\\ Controller\\ ControllerResolver `
259
+ a) If the `` _controller `` key doesn't follow the recommended PHP namespace
260
+ format (e.g. `` App\Controller\DefaultController::index ``) its format is
261
+ transformed into it. For example, the legacy `` AppBundle:Default:index ``
262
+ format would be changed to ``Acme\AppBundle \Controller\DefaultController::indexAction ``.
263
+ This transformation is specific to the :class: `Symfony\\ Bundle\\ FrameworkBundle\\ Controller\\ ControllerResolver `
264
264
sub-class used by the Symfony Framework.
265
265
266
266
b) A new instance of your controller class is instantiated with no
@@ -300,11 +300,10 @@ on the event object that's passed to listeners on this event.
300
300
the Symfony Framework, and many deal with collecting profiler data when
301
301
the profiler is enabled.
302
302
303
- One interesting listener comes from the `SensioFrameworkExtraBundle `_,
304
- which is packaged with the Symfony Standard Edition. This listener's
305
- `@ParamConverter `_ functionality allows you to pass a full object (e.g. a
306
- ``Post `` object) to your controller instead of a scalar value (e.g. an
307
- ``id `` parameter that was on your route). The listener -
303
+ One interesting listener comes from the `SensioFrameworkExtraBundle `_. This
304
+ listener's `@ParamConverter `_ functionality allows you to pass a full object
305
+ (e.g. a ``Post `` object) to your controller instead of a scalar value (e.g.
306
+ an ``id `` parameter that was on your route). The listener -
308
307
``ParamConverterListener `` - uses reflection to look at each of the
309
308
arguments of the controller and tries to use different methods to convert
310
309
those to objects, which are then stored in the ``attributes `` property of
@@ -423,12 +422,11 @@ return a ``Response``.
423
422
.. sidebar :: ``kernel.view`` in the Symfony Framework
424
423
425
424
There is no default listener inside the Symfony Framework for the ``kernel.view ``
426
- event. However, one core bundle - `SensioFrameworkExtraBundle `_ - *does *
427
- add a listener to this event. If your controller returns an array,
428
- and you place the `@Template `_ annotation above the controller, then this
429
- listener renders a template, passes the array you returned from your
430
- controller to that template, and creates a ``Response `` containing the
431
- returned content from that template.
425
+ event. However, `SensioFrameworkExtraBundle `_ *does * add a listener to this
426
+ event. If your controller returns an array, and you place the `@Template `_
427
+ annotation above the controller, then this listener renders a template,
428
+ passes the array you returned from your controller to that template, and
429
+ creates a ``Response `` containing the returned content from that template.
432
430
433
431
Additionally, a popular community bundle `FOSRestBundle `_ implements
434
432
a listener on this event which aims to give you a robust view layer
@@ -514,9 +512,9 @@ as possible to the client (e.g. sending emails).
514
512
515
513
.. sidebar :: ``kernel.terminate`` in the Symfony Framework
516
514
517
- If you use the SwiftmailerBundle with Symfony and use `` memory `` spooling,
518
- then the `EmailSenderListener `_ is activated, which actually delivers
519
- any emails that you scheduled to send during the request.
515
+ If you use the :ref: ` memory spooling < email-spool- memory>` option of the
516
+ default Symfony mailer, then the `EmailSenderListener `_ is activated, which
517
+ actually delivers any emails that you scheduled to send during the request.
520
518
521
519
.. _component-http-kernel-kernel-exception :
522
520
0 commit comments