File tree 1 file changed +3
-8
lines changed
1 file changed +3
-8
lines changed Original file line number Diff line number Diff line change @@ -76,20 +76,15 @@ Template Configuration
76
76
Don't use the ``@Template() `` annotation to configure the template used by
77
77
the controller.
78
78
79
- The ``@Template `` annotation is useful, but also involves some magic. For
80
- that reason, we don't recommend using it.
79
+ The ``@Template `` annotation is useful, but also involves some magic. We
80
+ don't think its benefit is worth the magic, and so recommend against using
81
+ it.
81
82
82
83
Most of the time, ``@Template `` is used without any parameters, which makes
83
84
it more difficult to know which template is being rendered. It also makes
84
85
it less obvious to beginners that a controller should always return a Response
85
86
object (unless you're using a view layer).
86
87
87
- Lastly, the ``@Template `` annotation uses a ``TemplateListener `` class that hooks
88
- into the ``kernel.view `` event dispatched by the framework. This listener introduces
89
- a measurable performance impact. In the sample blog application, rendering the
90
- homepage took 5 milliseconds using the ``$this->render() `` method and 26 milliseconds
91
- using the ``@Template `` annotation.
92
-
93
88
How the Controller Looks
94
89
------------------------
95
90
You can’t perform that action at this time.
0 commit comments