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

Added docs for castToArray() helper#7580

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
wouterj merged 1 commit intosymfony:masterfromjaviereguiluz:doc_21893
Mar 7, 2017
Merged
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
15 changes: 13 additions & 2 deletionscomponents/config/definition.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -190,6 +190,18 @@ inside the current node. According to the prototype definition in the example
above, it is possible to have multiple connection arrays (containing a ``driver``,
``host``, etc.).

.. versionadded:: 3.3
The ``castToArray()`` helper was added in Symfony 3.3.

Sometimes, to improve the user experience of your application or bundle, you may
allow to use a simple string or numeric value where an array value is required.
Use the ``castToArray()`` helper to turn those variables into arrays::

->arrayNode('hosts')
->beforeNormalization()->castToArray()->end()
// ...
->end()

Array Node Options
~~~~~~~~~~~~~~~~~~

Expand DownExpand Up@@ -750,8 +762,7 @@ A validation rule also requires a "then" part:
- ``thenUnset()``

Usually, "then" is a closure. Its return value will be used as a new value
for the node, instead
of the node's original value.
for the node, instead of the node's original value.

Processing Configuration Values
-------------------------------
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp