@@ -44,7 +44,7 @@ Symfony ships with four value resolvers in the HttpKernel component:
44
44
Adding a Custom Value Resolver
45
45
------------------------------
46
46
47
- Adding a new value resolver requires creatign one class and one service
47
+ Adding a new value resolver requires creating one class and one service
48
48
definition. In the next example, you'll create a value resolver to inject the
49
49
``User `` object from the security system. Given you write the following
50
50
controller::
@@ -189,13 +189,13 @@ subrequests.
189
189
190
190
.. tip ::
191
191
192
- As you see in the ``UserValueResolver::supports() `` method, the user may
193
- not be available (e.g. when the controller is not behind a firewall). In
194
- these cases, the resolver will not be executed. If no argument value is
195
- resolved, an exception will be throwed .
192
+ As you can see in the ``UserValueResolver::supports() `` method, the user
193
+ may not be available (e.g. when the controller is not behind a firewall).
194
+ In these cases, the resolver will not be executed. If no argument value
195
+ is resolved, an exception will be thrown .
196
196
197
197
To prevent this, you can add a default value in the controller (e.g. ``User
198
- $user = null ``). The ``DefaultValueResolver `` is executed as last resolver
199
- and will use the default value if no value is resolved already.
198
+ $user = null ``). The ``DefaultValueResolver `` is executed as the last
199
+ resolver and will use the default value if no value was already resolved .
200
200
201
201
.. _`yield` : http://php.net/manual/en/language.generators.syntax.php
0 commit comments