File tree Expand file tree Collapse file tree 3 files changed +2
-45
lines changed Expand file tree Collapse file tree 3 files changed +2
-45
lines changed Original file line number Diff line number Diff line change @@ -140,49 +140,6 @@ rather than being tied up and hidden with the service definition:
140140 If you were using this elsewhere as well, then you would only need to change
141141the parameter value in one place if needed.
142142
143- You can also use the parameters in the service definition, for example,
144- making the class of a service a parameter:
145-
146- .. configuration-block ::
147-
148- .. code-block :: yaml
149-
150- parameters :
151- mailer.transport : sendmail
152-
153- services :
154- mailer :
155- class : Mailer
156- arguments : ["%mailer.transport%"]
157-
158- .. code-block :: xml
159-
160- <?xml version =" 1.0" encoding =" UTF-8" ?>
161- <container xmlns =" http://symfony.com/schema/dic/services"
162- xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
163- xsi : schemaLocation =" http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd" >
164-
165- <parameters >
166- <parameter key =" mailer.transport" >sendmail</parameter >
167- </parameters >
168-
169- <services >
170- <service id =" mailer" class =" Mailer" >
171- <argument >%mailer.transport%</argument >
172- </service >
173- </services >
174- </container >
175-
176- .. code-block :: php
177-
178- use Symfony\Component\DependencyInjection\Reference;
179-
180- $container->setParameter('mailer.transport', 'sendmail');
181-
182- $container
183- ->register('mailer', 'Mailer')
184- ->addArgument('%mailer.transport%');
185-
186143.. note ::
187144
188145 The percent sign inside a parameter or argument, as part of the string, must
Original file line number Diff line number Diff line change @@ -153,7 +153,7 @@ of the ``Person`` class would be encoded in XML format::
153153 </person>
154154 EOF;
155155
156- $person = $serializer->deserialize($data,'Acme\Person','xml');
156+ $person = $serializer->deserialize($data, 'Acme\Person', 'xml');
157157
158158In this case, :method: `Symfony\\ Component\\ Serializer\\ Serializer::deserialize `
159159needs three parameters:
Original file line number Diff line number Diff line change @@ -196,7 +196,7 @@ method is used.
196196
197197 $templating = new DelegatingEngine(array(
198198 new PhpEngine(...),
199- new CustomEngine(...)
199+ new CustomEngine(...),
200200 ));
201201
202202 .. _Packagist : https://packagist.org/packages/symfony/templating
You can’t perform that action at this time.
0 commit comments