@@ -62,8 +62,8 @@ to run Symfony:
62
62
63
63
$ php app/console server:run
64
64
65
- Open your browser and access to the ``http://localhost:8000/ `` URL to see the
66
- Welcome page of Symfony2:
65
+ Open your browser and access to the ``http://localhost:8000/app_dev.php `` URL to
66
+ see the Welcome page of Symfony2:
67
67
68
68
.. image :: /images/quick_tour/symfony2_welcome_page.png
69
69
:align: center
@@ -95,10 +95,10 @@ main concepts. Go to the following URL to be greeted by Symfony2 (replace
95
95
96
96
What's going on here? Have a look at each part of the URL:
97
97
98
- * ``app_dev.php ``: This is a :term: `front controller `. It is the unique entry
98
+ * ``app_dev.php ``: this is a :term: `front controller `. It is the unique entry
99
99
point of the application and it responds to all user requests;
100
100
101
- * ``/demo/hello/Fabien ``: This is the *virtual path * to the resource the user
101
+ * ``/demo/hello/Fabien ``: this is the *virtual path * to the resource the user
102
102
wants to access.
103
103
104
104
Your responsibility as a developer is to write the code that maps the user's
@@ -108,13 +108,9 @@ Your responsibility as a developer is to write the code that maps the user's
108
108
Routing
109
109
~~~~~~~
110
110
111
- Symfony2 routes the request to the code that handles it by trying to match the
8000
112
- requested URL (i.e. the virtual path) against some configured paths. By default,
113
- these paths (called routes) are defined in the ``app/config/routing.yml `` configuration
114
- file. When you're in the ``dev `` :ref: `environment<quick-tour-big-picture-environments> ` -
115
- indicated by the app_**dev**.php front controller - the ``app/config/routing_dev.yml ``
116
- configuration file is also loaded. In the Standard Edition, the routes to
117
- these "demo" pages are imported from this file:
111
+ Symfony2 routes the request to the code that handles it by matching the
112
+ requested URL (i.e. the virtual path) against some configured paths. The demo
113
+ paths are defined in the ``app/config/routing_dev.yml `` configuration file:
118
114
119
115
.. code-block :: yaml
120
116
@@ -125,13 +121,14 @@ these "demo" pages are imported from this file:
125
121
_acme_demo :
126
122
resource : " @AcmeDemoBundle/Resources/config/routing.yml"
127
123
128
- This imports a ``routing.yml `` file that lives inside the AcmeDemoBundle:
124
+ The ``_acme_demo `` routes are imported from a ``routing.yml `` file that lives
125
+ inside the AcmeDemoBundle:
129
126
130
127
.. code-block :: yaml
131
128
132
129
# src/Acme/DemoBundle/Resources/config/routing.yml
133
130
_welcome :
134
- path : /
131
+ path : /
135
132
defaults : { _controller: AcmeDemoBundle:Welcome:index }
136
133
137
134
_demo :
@@ -148,12 +145,10 @@ will be executed. In the next section, you'll learn exactly what that means.
148
145
149
146
.. tip ::
150
147
151
- The Symfony2 Standard Edition uses :doc: `YAML</components/yaml/yaml_format> `
152
- for its configuration files, but Symfony2 also supports XML, PHP, and
153
- annotations natively. The different formats are compatible and may be
154
- used interchangeably within an application. Also, the performance of
155
- your application does not depend on the configuration format you choose
156
- as everything is cached on the very first request.
148
+ In addition to YAML format, routes can be configured in XML or PHP files
149
+ and even as annotations on PHP classes. This flexibility is one of the main
150
+ features of Symfony2, a framework that never imposes you a particular
151
+ configuration format.
157
152
158
153
Controllers
159
154
~~~~~~~~~~~
0 commit comments