Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit05492b2

Browse files
committed
Clarify parameters conventions
1 parentf285d93 commit05492b2

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

‎components/dependency_injection/parameters.rst

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,13 @@ and set a parameter in the container with::
2525

2626
$container->setParameter('mailer.transport', 'sendmail');
2727

28+
..caution::
29+
30+
The used ``.`` notation is just a
31+
:ref:`Symfony convention<service-naming-conventions>` to make parameters
32+
easier to read. Parameters are just flat key-value elements, they can't be
33+
inherited.
34+
2835
..note::
2936

3037
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:
190197
Array Parameters
191198
----------------
192199

193-
Parameters do not need to be flat strings, they can alsobe arrays. For the XML
194-
format, you need to use the ``type="collection"`` attribute for all parameters that are
195-
arrays.
200+
Parameters do not need to be flat strings, they can alsocontain array values.
201+
For the XMLformat, you need to use the ``type="collection"`` attribute for
202+
all parameters that arearrays.
196203

197204
..configuration-block::
198205

‎contributing/code/standards.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,8 @@ Naming Conventions
133133
* Don't forget to look at the more verbose:doc:`conventions` document for
134134
more subjective naming considerations.
135135

136+
.. _service-naming-conventions:
137+
136138
Service Naming Conventions
137139
~~~~~~~~~~~~~~~~~~~~~~~~~~
138140

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp