Skip to content

Commit

Permalink
minor #5143 Rebased #4747 (ifdattic)
Browse files Browse the repository at this point in the history
This PR was merged into the 2.3 branch.

Discussion
----------

Rebased #4747

This is just a rebase #4747

| Q             | A
| ------------- | ---
| Doc fix?      | yes
| New docs?     | no
| Applies to    | 2.3
| Fixed tickets |

Commits
-------

3b12cff Update controller.rst
  • Loading branch information
wouterj committed Apr 7, 2015
2 parents b467e23 + 3b12cff commit 0dc6204
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions book/controller.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Controller
==========

A controller is a PHP callable you create that takes information from the
HTTP request and constructs and returns an HTTP response (as a Symfony
HTTP request and creates and returns an HTTP response (as a Symfony
``Response`` object). The response could be an HTML page, an XML document,
a serialized JSON array, an image, a redirect, a 404 error or anything else
you can dream up. The controller contains whatever arbitrary logic *your
Expand Down Expand Up @@ -34,7 +34,7 @@ common examples:
for the homepage of the site.

* *Controller B* reads the ``slug`` parameter from the request to load a
blog entry from the database and create a ``Response`` object displaying
blog entry from the database and creates a ``Response`` object displaying
that blog. If the ``slug`` can't be found in the database, it creates and
returns a ``Response`` object with a 404 status code.

Expand Down Expand Up @@ -478,7 +478,9 @@ You can also put templates in deeper sub-directories. Just try to avoid creating
unnecessarily deep structures::

// renders app/Resources/views/hello/greetings/index.html.twig
return $this->render('hello/greetings/index.html.twig', array('name' => $name));
return $this->render('hello/greetings/index.html.twig', array(
'name' => $name
));

The Symfony templating engine is explained in great detail in the
:doc:`Templating </book/templating>` chapter.
Expand Down Expand Up @@ -513,7 +515,7 @@ via the ``get()`` method. Here are several common services you might need::

$mailer = $this->get('mailer');

What other services exist? You can list all services, use the ``container:debug``
What other services exist? To list all services, use the ``container:debug``
console command:

.. code-block:: bash
Expand Down

0 comments on commit 0dc6204

Please sign in to comment.