@@ -30,8 +30,8 @@ The front controller
30
30
====================
31
31
32
32
The `front controller `_ is a well-known design pattern; it is a
33
- section of
34
- code that * all * requests served by an application run through.
33
+ section of code that * all * requests served by an application run
34
+ through.
35
35
36
36
In the `Symfony 2 Standard Edition `_, this role is taken by the
37
37
``app.php``_ and ``app_dev.php``_ files in the ``web/ `` directory.
@@ -86,21 +86,22 @@ only that is not used for web, but for command line requests.
86
86
The ``AppKernel ``
87
87
=================
88
88
89
- The Kernel object is the core of Symfony2. The Kernel is responsible for
90
- setting up all the bundles that make up your application and providing
91
- them with the application's configuration. It then creates the service
92
- container before serving requests in its
89
+ The :class: `Symfony\\ Component\\ HttpKernel\\ Kernel ` is the core of
90
+ Symfony2. It is responsible for setting up all the bundles that make up
91
+ your application and providing them with the application's
92
+ configuration. It then creates the service container before serving
93
+ requests in its
93
94
:method: `Symfony\\ Component\\ HttpKernel\\ HttpKernelInterface::handle `
94
95
method.
95
96
96
- There are two ` template methods`_ related to the first two of these
97
- steps which the
98
- :class: `base HttpKernel < Symfony\\ Component\\ HttpKernel\\ HttpKernel> `
99
- does not implement :
97
+ There are two methods declared in the
98
+ :class: ` Symfony \\ Component \\ HttpKernel \\ KernelInterface ` that are
99
+ left unimplemented in :class: `Symfony\\ Component\\ HttpKernel\\ Kernel `
100
+ and thus serve as ` template methods `_ :
100
101
101
- * :method: `Symfony\\ Component\\ HttpKernel\\ HttpKernel ::registerBundles `,
102
- which must return an array of all bundles needed to
103
- run the application;
102
+ * :method: `Symfony\\ Component\\ HttpKernel\\ KernelInterface ::registerBundles `,
103
+ which must return an array of all bundles needed to run the
104
+ application;
104
105
105
106
* :method: `Symfony\\ Component\\ HttpKernel\\ KernelInterface::registerContainerConfiguration `,
106
107
which loads the application configuration.
@@ -115,10 +116,10 @@ Again, the Symfony2 Standard Edition provides an `AppKernel`_ in
115
116
uses the name of the environment, which is passed to the Kernel's
116
117
:method: `constructor<Symfony\\ Component\\ HttpKernel\\ Kernel::__construct> `
117
118
and is available via
118
- :method: `getEnvironment()< Symfony\\ Component\\ HttpKernel\\ Kernel::getEnvironment> `,
119
- to decide which bundles to create in `` registerBundles() ``. This method
120
- is meant to be extended by you when you start adding bundles to your
121
- application.
119
+ :method: `Symfony\\ Component\\ HttpKernel\\ Kernel::getEnvironment `,
120
+ to decide which bundles to create. The logic for that is in
121
+ `` registerBundles() ``, a method meant to be extended by you when you
122
+ start adding bundles to your application.
122
123
123
124
You are, of course, free to create your own, alternative or additional
124
125
``AppKernel `` variants. All you need is to adapt your (or add a new) front
@@ -182,5 +183,4 @@ are, of course, free to implement this method differently if you need
182
183
.. _decorate : http://en.wikipedia.org/wiki/Decorator_pattern
183
184
.. _Debug Component : https://github.com/symfony/symfony/pull/7441
184
185
.. _RewriteRule shipped with the Standard Edition : https://github.com/symfony/symfony-standard/blob/master/web/.htaccess)
185
- .. _base HTTPKernel : https://github.com/symfony/symfony/blob/master/src/Symfony/Component/HttpKernel/HttpKernel.php
186
186
.. _template methods : http://en.wikipedia.org/wiki/Template_method_pattern
0 commit comments