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 4238c27

Browse filesBrowse files
committed
minor #6651 [#6438] some tweaks to the argument value resolver (xabbuh)
This PR was merged into the 3.1 branch. Discussion ---------- [#6438] some tweaks to the argument value resolver Commits ------- 2cdd6dc [#6438] some tweaks to the argument value resolver
2 parents a01f87f + 2cdd6dc commit 4238c27
Copy full SHA for 4238c27

File tree

1 file changed

+7
-7
lines changed
Filter options

1 file changed

+7
-7
lines changed

‎cookbook/controller/argument_value_resolver.rst

Copy file name to clipboardExpand all lines: cookbook/controller/argument_value_resolver.rst
+7-7Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ Symfony ships with four value resolvers in the HttpKernel component:
4444
Adding a Custom Value Resolver
4545
------------------------------
4646

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
4848
definition. In the next example, you'll create a value resolver to inject the
4949
``User`` object from the security system. Given you write the following
5050
controller::
@@ -189,13 +189,13 @@ subrequests.
189189

190190
.. tip::
191191

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.
196196

197197
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.
200200

201201
.. _`yield`: http://php.net/manual/en/language.generators.syntax.php

0 commit comments

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