From 3090cf2c68622ffc9c1ef5d544cccb2fe4dcc468 Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Wed, 22 Jan 2014 17:48:33 +0100 Subject: [PATCH] fix include directive so that the contents are really included --- book/includes/_service_container_my_mailer.rst.inc | 5 ++--- book/service_container.rst | 4 ++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/book/includes/_service_container_my_mailer.rst.inc b/book/includes/_service_container_my_mailer.rst.inc index efc2eaeac26..675df06f375 100644 --- a/book/includes/_service_container_my_mailer.rst.inc +++ b/book/includes/_service_container_my_mailer.rst.inc @@ -16,8 +16,7 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd" - > - + > sendmail @@ -33,4 +32,4 @@ $container->setDefinition('my_mailer', new Definition( 'Acme\HelloBundle\Mailer', array('sendmail') - )); \ No newline at end of file + )); diff --git a/book/service_container.rst b/book/service_container.rst index 3dc5698c853..655cf604e4e 100644 --- a/book/service_container.rst +++ b/book/service_container.rst @@ -103,7 +103,7 @@ for you. In order for this to work, you must *teach* the container how to create the ``Mailer`` service. This is done via configuration, which can be specified in YAML, XML or PHP: -.. include includes/_service_container_my_mailer.rst.inc +.. include:: includes/_service_container_my_mailer.rst.inc .. note:: @@ -643,7 +643,7 @@ which has a ``getMailerMethod()`` method on it, which will return a string like ``sendmail`` based on some configuration. Remember that the first argument to the ``my_mailer`` service is the simple string ``sendmail``: -.. include includes/_service_container_my_mailer.rst.inc +.. include:: includes/_service_container_my_mailer.rst.inc But instead of hardcoding this, how could we get this value from the ``getMailerMethod()`` of the new ``mailer_configuration`` service? One way is to use an expression: