Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 0dc6204

Browse filesBrowse files
committed
minor #5143 Rebased #4747 (ifdattic)
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
2 parents b467e23 + 3b12cff commit 0dc6204
Copy full SHA for 0dc6204

File tree

Expand file treeCollapse file tree

1 file changed

+6
-4
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+6
-4
lines changed

‎book/controller.rst

Copy file name to clipboardExpand all lines: book/controller.rst
+6-4Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Controller
55
==========
66

77
A 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,
1010
a serialized JSON array, an image, a redirect, a 404 error or anything else
1111
you 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

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

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

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

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

516-
What other services exist? You can list all services, use the ``container:debug``
518+
What other services exist? To list all services, use the ``container:debug``
517519
console command:
518520

519521
.. code-block:: bash

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.