@@ -569,7 +569,7 @@ the service container gives you a much more appealing option:
569569 services :
570570 my_mailer :
571571 # ...
572-
572+
573573 newsletter_manager :
574574 class : Acme\HelloBundle\Newsletter\NewsletterManager
575575 arguments : ["@my_mailer"]
@@ -765,7 +765,7 @@ Injecting the dependency by the setter method just needs a change of syntax:
765765 services :
766766 my_mailer :
767767 # ...
768-
768+
769769 newsletter_manager :
770770 class : Acme\HelloBundle\Newsletter\NewsletterManager
771771 calls :
@@ -800,7 +800,7 @@ Injecting the dependency by the setter method just needs a change of syntax:
800800 use Symfony\Component\DependencyInjection\Reference;
801801
802802 $container->setDefinition('my_mailer', ...);
803-
803+
804804 $container->setDefinition('newsletter_manager', new Definition(
805805 'Acme\HelloBundle\Newsletter\NewsletterManager'
806806 ))->addMethodCall('setMailer', array(
@@ -944,7 +944,7 @@ it exists and do nothing if it doesn't:
944944 <service id =" my_mailer" >
945945 <!-- ... -->
946946 </service >
947-
947+
948948 <service id =" newsletter_manager" class =" Acme\HelloBundle\Newsletter\NewsletterManager" >
949949 <argument type =" service" id =" my_mailer" on-invalid =" ignore" />
950950 </service >
@@ -959,7 +959,7 @@ it exists and do nothing if it doesn't:
959959 use Symfony\Component\DependencyInjection\ContainerInterface;
960960
961961 $container->setDefinition('my_mailer', ...);
962-
962+
963963 $container->setDefinition('newsletter_manager', new Definition(
964964 'Acme\HelloBundle\Newsletter\NewsletterManager',
965965 array(
0 commit comments