@@ -73,7 +73,7 @@ makes it easier to change rather than being tied up with the service definition:
73
73
services :
74
74
mailer :
75
75
class : Mailer
76
- arguments : [%mailer.transport%]
76
+ arguments : [' %mailer.transport%' ]
77
77
78
78
.. code-block :: xml
79
79
@@ -85,7 +85,6 @@ makes it easier to change rather than being tied up with the service definition:
85
85
<service id =" mailer" class =" Mailer" >
86
86
<argument >%mailer.transport%</argument >
87
87
</service >
88
-
89
88
</services >
90
89
91
90
.. code-block :: php
@@ -114,8 +113,8 @@ making the class of a service a parameter:
114
113
115
114
services :
116
115
mailer :
117
- class : %mailer.class%
118
- arguments : [%mailer.transport%]
116
+ class : ' %mailer.class%'
117
+ arguments : [' %mailer.transport%' ]
119
118
120
119
.. code-block :: xml
121
120
@@ -151,15 +150,25 @@ making the class of a service a parameter:
151
150
The percent sign inside a parameter or argument, as part of the string, must
152
151
be escaped with another percent sign:
153
152
153
+ .. configuration-block ::
154
+
155
+ .. code-block :: yaml
156
+
157
+ arguments : ['http://symfony.com/?foo=%%s&bar=%%d']
158
+
154
159
.. code-block :: xml
155
160
156
161
<argument type =" string" >http://symfony.com/?foo=%%s& bar=%%d</argument >
157
162
163
+ .. code-block :: php
164
+
165
+ ->addArgument('http://symfony.com/?foo=%%s&bar=%%d');
166
+
158
167
Array Parameters
159
168
----------------
160
169
161
170
Parameters do not need to be flat strings, they can also be arrays. For the XML
162
- format, you need to use the type="collection" attribute for all parameters that are
171
+ format, you need to use the `` type="collection" `` attribute for all parameters that are
163
172
arrays.
164
173
165
174
.. configuration-block ::
0 commit comments