You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: book/controller.rst
+7-5Lines changed: 7 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@ Controller
5
5
==========
6
6
7
7
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
9
9
``Response`` object). The response could be an HTML page, an XML document,
10
10
a serialized JSON array, an image, a redirect, a 404 error or anything else
11
11
you can dream up. The controller contains whatever arbitrary logic *your
@@ -34,7 +34,7 @@ common examples:
34
34
for the homepage of the site.
35
35
36
36
* *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
38
38
that blog. If the ``slug`` can't be found in the database, it creates and
39
39
returns a ``Response`` object with a 404 status code.
40
40
@@ -201,7 +201,7 @@ to the controller:
201
201
202
202
return $collection;
203
203
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``
205
205
if you're using the :doc:`built-in web server </cookbook/web_server/built_in>`)
206
206
and Symfony will execute the ``HelloController::indexAction()`` controller
207
207
and 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
0 commit comments