@@ -5,7 +5,7 @@ Controller
55==========
66
77A controller is a PHP callable you create that takes information from the
8- HTTP request and constructs and returns an HTTP response (as a Symfony
8+ HTTP request and creates and returns an HTTP response (as a Symfony
99``Response `` object). The response could be an HTML page, an XML document,
1010a serialized JSON array, an image, a redirect, a 404 error or anything else
1111you can dream up. The controller contains whatever arbitrary logic *your
@@ -34,7 +34,7 @@ common examples:
3434 for the homepage of the site.
3535
3636* *Controller B * reads the ``slug `` parameter from the request to load a
37- blog entry from the database and create a ``Response `` object displaying
37+ blog entry from the database and creates a ``Response `` object displaying
3838 that blog. If the ``slug `` can't be found in the database, it creates and
3939 returns a ``Response `` object with a 404 status code.
4040
@@ -201,7 +201,7 @@ to the controller:
201201
202202 return $collection;
203203
204- Now, you can go to ``/hello/ryan `` (e.g. ``http://localhost:8000/app_dev.php/ hello/ryan ``
204+ Now, you can go to ``/hello/ryan `` (e.g. ``http://localhost:8000/hello/ryan ``
205205if you're using the :doc: `built-in web server </cookbook/web_server/built_in >`)
206206and Symfony will execute the ``HelloController::indexAction() `` controller
207207and pass in ``ryan `` for the ``$name `` variable. Creating a "page" means
@@ -490,7 +490,9 @@ You can also put templates in deeper sub-directories. Just try to avoid creating
490490unnecessarily deep structures::
491491
492492 // renders app/Resources/views/hello/greetings/index.html.twig
493- return $this->render('hello/greetings/index.html.twig', array('name' => $name));
493+ return $this->render('hello/greetings/index.html.twig', array(
494+ 'name' => $name
495+ ));
494496
495497The Symfony templating engine is explained in great detail in the
496498:doc: `Templating </book/templating >` chapter.
@@ -525,7 +527,7 @@ via the ``get()`` method. Here are several common services you might need::
525527
526528 $mailer = $this->get('mailer');
527529
528- What other services exist? You can list all services, use the ``debug:container ``
530+ What other services exist? To list all services, use the ``debug:container ``
529531console command:
530532
531533.. code-block :: bash
0 commit comments