@@ -146,7 +146,7 @@ will be executed. In the next section, you'll learn exactly what that means.
146
146
.. tip ::
147
147
148
148
In addition to YAML format, routes can be configured in XML or PHP files
149
- and even embedded in PHP annotations. This flexibility is one of the main
149
+ and even embedded in PHP annotations. This flexibility is one of the main
150
150
features of Symfony2, a framework that never imposes you a particular
151
151
configuration format.
152
152
@@ -251,7 +251,7 @@ file, routes are defined as annotations on action methods::
251
251
// ...
252
252
}
253
253
254
- The ``@Route() `` annotation creates a new route matching the ``/hello/{name} ``
254
+ The ``@Route() `` annotation creates a new route matching the ``/hello/{name} ``
255
255
path to the ``helloAction() `` method. Any string enclosed in curly brackets,
256
256
like ``{name} ``, is considered a variable that can be directly retrieved as a
257
257
method argument with the same name.
@@ -281,9 +281,9 @@ template (or ``AcmeDemoBundle:Demo:hello.html.twig`` if you use the logical name
281
281
<h1>Hello {{ name }}!</h1>
282
282
{% endblock %}
283
283
284
- By default, Symfony2 uses `Twig `_ as its template engine but you can also use
285
- traditional PHP templates if you choose. The next chapter will introduce how
286
- templates work in Symfony2.
284
+ By default, Symfony2 uses `Twig <http://twig.sensiolabs.org/> ` as its template
285
+ engine but you can also use traditional PHP templates if you choose. The next
286
+ chapter will introduce how templates work in Symfony2.
287
287
288
288
Bundles
289
289
~~~~~~~
@@ -309,26 +309,15 @@ Symfony2 developer's best friend!
309
309
.. image :: /images/quick_tour/web_debug_toolbar.png
310
310
:align: center
311
311
312
- But what you see initially is only the tip of the iceberg; click on the
313
- hexadecimal number ( the session token) to reveal yet another very useful
314
- Symfony2 debugging tool: the profiler.
312
+ But what you see initially is only the tip of the iceberg; click on any of the
313
+ bar sections to open the profiler and get much more detailed information about
314
+ the request, the query parameters, security details, and database queries:
315
315
316
316
.. image :: /images/quick_tour/profiler.png
317
317
:align: center
318
318
319
- .. note ::
320
-
321
- You can also get more information quickly by hovering over the items
322
- on the Web Debug Toolbar, or clicking them to go to their respective
323
- pages in the profiler.
324
-
325
- When loaded and enabled (by default in the ``dev `` :ref: `environment<quick-tour-big-picture-environments-intro> `),
326
- the Profiler provides a web interface for a *huge * amount of information recorded
327
- on each request, including logs, a timeline of the request, GET or POST parameters,
328
- security details, database queries and more!
329
-
330
- Of course, it would be unwise to have these tools enabled when you deploy
331
- your application, so by default, the profiler is not enabled in the ``prod ``
319
+ Of course, it would be unwise to have this tool enabled when you deploy your
320
+ application, so by default, the profiler is not enabled in the ``prod ``
332
321
environment.
333
322
334
323
.. _quick-tour-big-picture-environments-intro :
@@ -338,7 +327,7 @@ So what *is* an environment? An :term:`Environment` is a simple string (e.g.
338
327
to run your application.
339
328
340
329
Typically, you put your common configuration in ``config.yml `` and override
341
- where necessary in the configuration for each environment. For example :
330
+ where necessary in the specific configuration file for each environment:
342
331
343
332
.. code-block :: yaml
344
333
@@ -356,33 +345,24 @@ enabling the web debug toolbar.
356
345
357
346
When you visit the ``app_dev.php `` file in your browser, you're executing
358
347
your Symfony application in the ``dev `` environment. To visit your application
359
- in the ``prod `` environment, visit the ``app.php `` file instead. The demo
360
- routes in our application are only available in the ``dev `` environment, but
361
- if those routes were available in the ``prod `` environment, you would be able
362
- to visit them in the ``prod `` environment by going to:
363
-
364
- .. code-block :: text
365
-
366
- http://localhost/app.php/demo/hello/Fabien
348
+ in the ``prod `` environment, visit the ``app.php `` file instead.
367
349
368
- If instead of using php's built-in webserver, you use Apache with ``mod_rewrite ``
369
- enabled and take advantage of the ``.htaccess `` file Symfony2 provides
370
- in ``web/ ``, you can even omit the ``app.php `` part of the URL. The default
371
- ``.htaccess `` points all requests to the ``app.php `` front controller:
350
+ The demo routes in our application are only available in the ``dev `` environment.
351
+ Therefore, if you try to access the ``http://localhost/app.php/demo/hello/Fabien ``
352
+ URL, you'll get a 404 error.
372
353
373
- .. code-block :: text
354
+ .. tip ::
374
355
375
- http://localhost/demo/hello/Fabien
356
+ If instead of using PHP built-in webserver, you use Apache with ``mod_rewrite ``
357
+ enabled and take advantage of the ``.htaccess `` file Symfony2 provides
358
+ in ``web/ ``, you can even omit the ``app.php `` part of the URL. The default
359
+ ``.htaccess `` points all requests to the ``app.php `` front controller:
376
360
377
- .. note ::
361
+ .. code-block :: text
378
362
379
- Note that the two URLs above are provided here only as **examples ** of
380
- how a URL looks like when the ``prod `` front controller is used. If you
381
- actually try them in an out-of-the-box installation of *Symfony Standard Edition *,
382
- you will get a 404 error since the *AcmeDemoBundle * is enabled only in
383
- the ``dev `` environment and its routes imported from ``app/config/routing_dev.yml ``.
363
+ http://localhost/demo/hello/Fabien
384
364
385
- For more details on environments, see ":ref: `Environments & Front Controllers<page-creation-environments> `".
365
+ For more details on environments, see ":ref: `Environments & Front Controllers<page-creation-environments> `" article .
386
366
387
367
Final Thoughts
388
368
--------------
@@ -392,11 +372,3 @@ hard, was it? There's a lot more to explore, but you should already see how
392
372
Symfony2 makes it really easy to implement web sites better and faster. If you
393
373
are eager to learn more about Symfony2, dive into the next section:
394
374
":doc: `The View<the_view> `".
395
-
396
- .. _Symfony2 Standard Edition : http://symfony.com/download
397
- .. _Symfony in 5 minutes : http://symfony.com/symfony-in-five-minutes
398
- .. _`Composer` : http://getcomposer.org/
399
- .. _Separation of Concerns : http://en.wikipedia.org/wiki/Separation_of_concerns
400
- .. _annotations in controllers : http://symfony.com/doc/current/bundles/SensioFrameworkExtraBundle/index.html#annotations-for-controllers
401
- .. _Twig : http://twig.sensiolabs.org/
402
- .. _`Symfony Installation Page` : http://symfony.com/download
0 commit comments