Skip to content

Commit b9eba94

Browse files
theoboldalexjaviereguiluz
authored andcommitted
Grammar fixes in front_controller.rst
1 parent b1be173 commit b9eba94

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

create_framework/front_controller.rst

+7-7
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,9 @@ not feel like a good abstraction, does it? We still have the ``send()`` method
5656
for all pages, our pages do not look like templates and we are still not able
5757
to test this code properly.
5858

59-
Moreover, adding a new page means that we need to create a new PHP script,
60-
which name is exposed to the end user via the URL
61-
(``http://127.0.0.1:4321/bye.php``): there is a direct mapping between the PHP
59+
Moreover, adding a new page means that we need to create a new PHP script, the name of
60+
which is exposed to the end user via the URL
61+
(``http://127.0.0.1:4321/bye.php``). There is a direct mapping between the PHP
6262
script name and the client URL. This is because the dispatching of the request
6363
is done by the web server directly. It might be a good idea to move this
6464
dispatching to our code for better flexibility. This can be achieved by routing
@@ -105,7 +105,7 @@ In the ``front.php`` script, ``$map`` associates URL paths with their
105105
corresponding PHP script paths.
106106

107107
As a bonus, if the client asks for a path that is not defined in the URL map,
108-
we return a custom 404 page; you are now in control of your website.
108+
we return a custom 404 page. You are now in control of your website.
109109

110110
To access a page, you must now use the ``front.php`` script:
111111

@@ -133,7 +133,7 @@ its sub-directories (only if needed -- see above tip).
133133
argument is the URL path you want to simulate.
134134

135135
Now that the web server always accesses the same script (``front.php``) for all
136-
pages, we can secure the code further by moving all other PHP files outside the
136+
pages, we can secure the code further by moving all other PHP files outside of the
137137
web root directory:
138138

139139
.. code-block:: text
@@ -151,7 +151,7 @@ web root directory:
151151
└── front.php
152152
153153
Now, configure your web server root directory to point to ``web/`` and all
154-
other files won't be accessible from the client anymore.
154+
other files will no longer be accessible from the client.
155155

156156
To test your changes in a browser (``http://localhost:4321/hello?name=Fabien``),
157157
run the :doc:`Symfony Local Web Server </setup/symfony_server>`:
@@ -166,7 +166,7 @@ run the :doc:`Symfony Local Web Server </setup/symfony_server>`:
166166
various PHP files; the changes are left as an exercise for the reader.
167167

168168
The last thing that is repeated in each page is the call to ``setContent()``.
169-
We can convert all pages to "templates" by just echoing the content and calling
169+
We can convert all pages to "templates" by echoing the content and calling
170170
the ``setContent()`` directly from the front controller script::
171171

172172
// example.com/web/front.php

0 commit comments

Comments
 (0)