File tree 1 file changed +2
-2
lines changed
components/dependency_injection 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -147,7 +147,7 @@ If you do want to though then the container can call the setter method::
147
147
148
148
$container
149
149
->register('newsletter_manager', 'NewsletterManager')
150
- ->addMethodCall('setMailer', new Reference('mailer'));
150
+ ->addMethodCall('setMailer', array( new Reference('mailer') ));
151
151
152
152
You could then get your ``newsletter_manager `` service from the container
153
153
like this::
@@ -259,6 +259,6 @@ The ``newsletter_manager`` and ``mailer`` services can be set up using config fi
259
259
260
260
$container
261
261
->register('newsletter_manager', 'NewsletterManager')
262
- ->addMethodCall('setMailer', new Reference('mailer'));
262
+ ->addMethodCall('setMailer', array( new Reference('mailer') ));
263
263
264
264
.. _Packagist : https://packagist.org/packages/symfony/dependency-injection
You can’t perform that action at this time.
0 commit comments