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

Clarify service parameters usages#3528

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
weaverryan merged 2 commits intosymfony:2.3fromwouterj:clarify-parameters
Feb 11, 2014
Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletionscomponents/dependency_injection/parameters.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -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 <service-naming-conventions>` to make parameters
easier to read. Parameters are just flat key-value elements, they can't be
organized into a nested array

.. note::

You can only set a parameter before the container is compiled. To learn
Expand DownExpand Up@@ -190,9 +197,9 @@ making the class of a service a parameter:
Array Parameters
----------------

Parameters do not need to be flat strings, they can alsobe 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 alsocontain array values.
Copy link
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

changed this toarray values, to make it explicitly clear that this isn't a way to inherit parameters.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

yea, very nice change

For the XMLformat, you need to use the ``type="collection"`` attribute for
all parameters that arearrays.

.. configuration-block::

Expand Down
2 changes: 2 additions & 0 deletionscontributing/code/standards.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -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
~~~~~~~~~~~~~~~~~~~~~~~~~~

Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp