10000 Added note for escaping '%' signs. Closes #1211 by iambrosi · Pull Request #1236 · symfony/symfony-docs · GitHub
[go: up one dir, main page]

Skip to content

Added note for escaping '%' signs. Closes #1211 #1236

< 8000 details class="details-reset details-overlay details-overlay-dark float-right" > New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 11, 2012
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions book/service_container.rst
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,12 @@ The end result is exactly the same as before - the difference is only in
to look for parameters with those names. When the container is built, it
looks up the value of each parameter and uses it in the service definition.

.. note::

The percent sign inside a parameter or argument, as part of the string, must
be escaped with another percent sign::
<argument type="string">http://symfony.com/?foo=%%s&bar=%%d</argument>

The purpose of parameters is to feed information into services. Of course
there was nothing wrong with defining the service without using any parameters.
Parameters, however, have several advantages:
Expand Down
0