Skip to content

Commit 86d7a6d

Browse files
committed
Some more fixes after proofreading
1 parent 5c754e0 commit 86d7a6d

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

book/from_flat_php_to_symfony2.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ of the application are isolated in a new file called ``model.php``:
177177

178178
.. tip::
179179

180-
The file name ``model.php`` is used because the logic and data access of
180+
The filename ``model.php`` is used because the logic and data access of
181181
an application is traditionally known as the "model" layer. In a well-organized
182182
application, the majority of the code representing your "business logic"
183183
should live in the model (as opposed to living in a controller). And unlike
@@ -244,8 +244,8 @@ the layout:
244244

245245
<?php include 'layout.php' ?>
246246

247-
You've now introduced a methodology that allows reusing the
248-
layout. Unfortunately, to accomplish this, you're forced to use a few ugly
247+
You now have a setup that will allow you to reuse the layout.
248+
Unfortunately, to accomplish this, you're forced to use a few ugly
249249
PHP functions (``ob_start()``, ``ob_get_clean()``) in the template. Symfony
250250
uses a Templating component that allows this to be accomplished cleanly
251251
and easily. You'll see it in action shortly.

book/http_cache.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -528,9 +528,9 @@ won't be asked to return the updated response until the cache finally becomes
528528
stale.
529529

530530
The validation model addresses this issue. Under this model, the cache continues
531-
to store responses. The difference is that, for each request, the cache asks
532-
the application whether the cached response is still valid. If the
533-
cache *is* still valid, your application should return a 304 status code
531+
to store responses. The difference is that, for each request, the cache asks the
532+
application if the cached response is still valid or if it needs to be regenerated.
533+
If the cache *is* still valid, your application should return a 304 status code
534534
and no content. This tells the cache that it's ok to return the cached response.
535535

536536
Under this model, you only save CPU if you're able to determine that the

book/validation.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ your application::
3131
}
3232

3333
So far, this is just an ordinary class that serves some purpose inside your
34-
application. The goal of validation is to tell you whether the data
34+
application. The goal of validation is to tell you if the data
3535
of an object is valid. For this to work, you'll configure a list of rules
3636
(called :ref:`constraints <validation-constraints>`) that the object must
3737
follow in order to be valid. These rules can be specified via a number of
@@ -112,7 +112,7 @@ Using the ``validator`` Service
112112
Next, to actually validate an ``Author`` object, use the ``validate`` method
113113
on the ``validator`` service (class :class:`Symfony\\Component\\Validator\\Validator`).
114114
The job of the ``validator`` is easy: to read the constraints (i.e. rules)
115-
of a class and verify whether the data on the object satisfies those
115+
of a class and verify if the data on the object satisfies those
116116
constraints. If validation fails, a non-empty list of errors
117117
(class :class:`Symfony\\Component\\Validator\\ConstraintViolationList`) is
118118
returned. Take this simple example from inside a controller::
@@ -303,7 +303,7 @@ to its class and then pass it to the ``validator`` service.
303303
Behind the scenes, a constraint is simply a PHP object that makes an assertive
304304
statement. In real life, a constraint could be: "The cake must not be burned".
305305
In Symfony, constraints are similar: they are assertions that a condition
306-
is true. Given a value, a constraint will tell you whether that value
306+
is true. Given a value, a constraint will tell you if that value
307307
adheres to the rules of the constraint.
308308

309309
Supported Constraints

0 commit comments

Comments
 (0)