From bb7d0b3005afebd669365ad0a8a6b739a5a0421a Mon Sep 17 00:00:00 2001 From: Joseph Bielawski Date: Thu, 26 Aug 2010 03:26:03 -0700 Subject: [PATCH 1/2] fixed typo --- quick_tour/the_view.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/quick_tour/the_view.rst b/quick_tour/the_view.rst index bb5d696c1ce..6f832c26792 100644 --- a/quick_tour/the_view.rst +++ b/quick_tour/the_view.rst @@ -237,7 +237,7 @@ Similarly, you can manage your stylesheets and JavaScripts with the .. code-block:: html+php - add('js/product.js') ?> + add('js/product.js') ?> add('css/product.css') ?> The ``add()`` method defines dependencies. To actually output these assets, you From 5aa30e08f0e25aaf2eba91e02a53a35df1e37792 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=F3zef=20Bielawski?= Date: Thu, 2 Sep 2010 22:02:34 +0200 Subject: [PATCH 2/2] fixed typos and sync with new syntax in quick_tour --- quick_tour/the_big_picture.rst | 2 +- quick_tour/the_controller.rst | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/quick_tour/the_big_picture.rst b/quick_tour/the_big_picture.rst index 56fb2d5bfb8..80ad8c05d68 100644 --- a/quick_tour/the_big_picture.rst +++ b/quick_tour/the_big_picture.rst @@ -73,7 +73,7 @@ URL to be greeted by Symfony (replace Fabien with your first name): What's going on here? Let's dissect the URL: -.. index:: Font Controller +.. index:: Front Controller * ``index_dev.php``: This is a "front controller". It is the unique entry point of the hello application and it responds to all user requests; diff --git a/quick_tour/the_controller.rst b/quick_tour/the_controller.rst index cad3d76ec80..2d6ba85bcd3 100644 --- a/quick_tour/the_controller.rst +++ b/quick_tour/the_controller.rst @@ -183,7 +183,7 @@ the ``router`` helper before. It takes the route name and an array of parameters as arguments and returns the associated friendly URL. You can also easily forward the action to another one with the ``forward()`` -method. As for the ``$view->actions`` helper, it makes an internal sub-request, +method. As for the ``$view['actions']`` helper, it makes an internal sub-request, but it returns the ``Response`` object to allow for further modification if the need arises:: @@ -215,7 +215,7 @@ helper: .. code-block:: html+php - request->getParameter('page') ?> + getParameter('page') ?> The Session ----------- @@ -229,13 +229,13 @@ Storing and retrieving information from the session can be easily achieved from any controller:: // store an attribute for reuse during a later user request - $this['request']->getSession()->setAttribute('foo', 'bar'); + $this['request']->getSession()->set('foo', 'bar'); // in another controller for another request - $foo = $this['request']->getSession()->getAttribute('foo'); + $foo = $this['request']->getSession()->get('foo'); // get/set the user culture - $this['request']->getSession()->setCulture('fr'); + $this['request']->getSession()->setLocale('fr'); You can also store small messages that will only be available for the very next request::