Permalink
Browse files

minor #4929 Remove block which doesn't make sense after best practice…

…s (ifdattic)

This PR was merged into the 2.3 branch.

Discussion
----------

Remove block which doesn't make sense after best practices

| Q             | A
| ------------- | ---
| Doc fix?      | yes
| New docs?     | no
| Applies to    | 2.3
| Fixed tickets |

Commits
-------

26415e2 Remove block which doesn't make sense after best practices
  • Loading branch information...
weaverryan committed Feb 1, 2015
2 parents 0afc689 + 26415e2 commit 42b44c4eb75d7a53cf094fe8cef4f2a847ec83c1
Showing with 0 additions and 43 deletions.
  1. +0 −43 components/dependency_injection/parameters.rst
@@ -140,49 +140,6 @@ rather than being tied up and hidden with the service definition:
If you were using this elsewhere as well, then you would only need to change
the parameter value in one place if needed.
You can also use the parameters in the service definition, for example,
making the class of a service a parameter:
.. configuration-block::
.. code-block:: yaml
parameters:
mailer.transport: sendmail
services:
mailer:
class: Mailer
arguments: ["%mailer.transport%"]
.. code-block:: xml
<?xml version="1.0" encoding="UTF-8" ?>
<container xmlns="http://symfony.com/schema/dic/services"
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">
<parameters>
<parameter key="mailer.transport">sendmail</parameter>
</parameters>
<services>
<service id="mailer" class="Mailer">
<argument>%mailer.transport%</argument>
</service>
</services>
</container>
.. code-block:: php
use Symfony\Component\DependencyInjection\Reference;
$container->setParameter('mailer.transport', 'sendmail');
$container
->register('mailer', 'Mailer')
->addArgument('%mailer.transport%');
.. note::
The percent sign inside a parameter or argument, as part of the string, must

0 comments on commit 42b44c4

Please sign in to comment.