Skip to content

Commit 365309d

Browse files
committed
Merge pull request #1751 from jeanmonod/config-node-type
Add a chapter about node type in the config component
2 parents c40cc10 + bf151ef commit 365309d

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

components/config/definition.rst

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,20 @@ The root node itself is an array node, and has children, like the boolean
9191
node ``auto_connect`` and the scalar node ``default_connection``. In general:
9292
after defining a node, a call to ``end()`` takes you one step up in the hierarchy.
9393

94+
Node type
95+
~~~~~~~~~
96+
97+
It is possible to validate the type of a provided value by using appropriate node
98+
definition. Node type are available for:
99+
100+
* scalar
101+
* boolean
102+
* array
103+
* variable (no validation)
104+
105+
and are created with ``node($name, $type)`` or their associated shortcuts
106+
``xxxxNode($name)`` method.
107+
94108
Array nodes
95109
~~~~~~~~~~~
96110

0 commit comments

Comments
 (0)