From 05492b277df8298d98ea5b6a2f95fe43bedb58dd Mon Sep 17 00:00:00 2001 From: WouterJ Date: Fri, 31 Jan 2014 16:30:35 +0100 Subject: [PATCH 1/2] Clarify parameters conventions --- components/dependency_injection/parameters.rst | 13 ++++++++++--- contributing/code/standards.rst | 2 ++ 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/components/dependency_injection/parameters.rst b/components/dependency_injection/parameters.rst index 4265fae224c..fc78b36ad37 100644 --- a/components/dependency_injection/parameters.rst +++ b/components/dependency_injection/parameters.rst @@ -25,6 +25,13 @@ and set a parameter in the container with:: $container->setParameter('mailer.transport', 'sendmail'); +.. caution:: + + The used ``.`` notation is just a + :ref:`Symfony convention ` to make parameters + easier to read. Parameters are just flat key-value elements, they can't be + inherited. + .. note:: You can only set a parameter before the container is compiled. To learn @@ -190,9 +197,9 @@ making the class of a service a parameter: Array Parameters ---------------- -Parameters do not need to be flat strings, they can also be arrays. For the XML -format, you need to use the ``type="collection"`` attribute for all parameters that are -arrays. +Parameters do not need to be flat strings, they can also contain array values. +For the XML format, you need to use the ``type="collection"`` attribute for +all parameters that are arrays. .. configuration-block:: diff --git a/contributing/code/standards.rst b/contributing/code/standards.rst index 1d512b3855e..aadcb34ef90 100644 --- a/contributing/code/standards.rst +++ b/contributing/code/standards.rst @@ -133,6 +133,8 @@ Naming Conventions * Don't forget to look at the more verbose :doc:`conventions` document for more subjective naming considerations. +.. _service-naming-conventions: + Service Naming Conventions ~~~~~~~~~~~~~~~~~~~~~~~~~~ From aaddfcd97a9918d5570c59fe59fecda2ddc72a59 Mon Sep 17 00:00:00 2001 From: Wouter J Date: Tue, 11 Feb 2014 07:57:39 +0100 Subject: [PATCH 2/2] Applied comment --- components/dependency_injection/parameters.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/dependency_injection/parameters.rst b/components/dependency_injection/parameters.rst index fc78b36ad37..939991adb7e 100644 --- a/components/dependency_injection/parameters.rst +++ b/components/dependency_injection/parameters.rst @@ -30,7 +30,7 @@ and set a parameter in the container with:: The used ``.`` notation is just a :ref:`Symfony convention ` to make parameters easier to read. Parameters are just flat key-value elements, they can't be - inherited. + organized into a nested array .. note::