From 8e132bd070c0122db4cdd7d17877226c96a1871f Mon Sep 17 00:00:00 2001 From: Sadiqul Islam Date: Sun, 19 Jul 2020 01:33:34 +0600 Subject: [PATCH] Added: Missing comment on XML and PHP code-block --- service_container/service_decoration.rst | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/service_container/service_decoration.rst b/service_container/service_decoration.rst index c9de48976d9..7dd497e1758 100644 --- a/service_container/service_decoration.rst +++ b/service_container/service_decoration.rst @@ -84,10 +84,14 @@ but keeps a reference of the old one as ``App\DecoratingMailer.inner``: + + @@ -103,9 +107,13 @@ but keeps a reference of the old one as ``App\DecoratingMailer.inner``: $container->register(Mailer::class); + // overrides the AppBundle\Mailer service + // but that service is still available as AppBundle\DecoratingMailer.inner $container->register(DecoratingMailer::class) ->setDecoratedService(Mailer::class) + // pass the old service as an argument ->addArgument(new Reference(DecoratingMailer::class.'.inner')) + // private, because usually you do not need to fetch AppBundle\DecoratingMailer directly ->setPublic(false) ;