@@ -22,6 +22,42 @@ HTTP response.
2222Symfony2 follows this philosophy and provides you with tools and conventions
2323to keep your application organized as it grows in users and complexity.
2424
25+ ..index ::
26+ single: Page creation; Environments & Front Controllers
27+
28+ .. _page-creation-environments :
29+
30+ Environments & Front Controllers
31+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
32+
33+ Every Symfony application runs within an:term: `environment `. An environment
34+ is a specific set of configuration and loaded bundles, represented by a string.
35+ The same application can be run with different configurations by running the
36+ application in different environments. Symfony2 comes with three environments
37+ defined — ``dev ``, ``test `` and ``prod `` — but you can create your own as well.
38+
39+ Environments are useful by allowing a single application to have a dev environment
40+ built for debugging and a production environment optimized for speed. You might
41+ also load specific bundles based on the selected environment. For example,
42+ Symfony2 comes with the WebProfilerBundle (described below), enabled only
43+ in the ``dev `` and ``test `` environments.
44+
45+ Symfony2 comes with two web-accessible front controllers: ``app_dev.php ``
46+ provides the ``dev `` environment, and ``app.php `` provides the ``prod `` environment.
47+ All web accesses to Symfony2 normally go through one of these front controllers.
48+ (The ``test `` environment is normally only used when running unit tests, and so
49+ doesn't have a dedicated front controller. The console tool also provides a
50+ front controller that can be used with any environment.)
51+
52+ When the front controller initializes the kernel, it provides two parameters:
53+ the environment, and also whether the kernel should run in debug mode.
54+ To make your application respond faster, Symfony2 maintains a cache under the
55+ ``app/cache/ `` directory. When in debug mode is enabled (such as ``app_dev.php ``
56+ does by default), this cache is flushed automatically whenever you make changes
57+ to any code or configuration. When running in debug mode, Symfony2 runs
58+ slower, but your changes are reflected without having to manually clear the
59+ cache.
60+
2561..index ::
2662 single: Page creation; Example
2763