From bf151efc3b6573d4414c217903fee57b8e5ddf5e Mon Sep 17 00:00:00 2001 From: Jeanmonod David Date: Wed, 26 Sep 2012 21:36:46 +0200 Subject: [PATCH] Add a chapter about node type in the config component --- components/config/definition.rst | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/components/config/definition.rst b/components/config/definition.rst index fdafcf29aab..05fa8294eec 100644 --- a/components/config/definition.rst +++ b/components/config/definition.rst @@ -91,6 +91,20 @@ The root node itself is an array node, and has children, like the boolean node ``auto_connect`` and the scalar node ``default_connection``. In general: after defining a node, a call to ``end()`` takes you one step up in the hierarchy. +Node type +~~~~~~~~~ + +It is possible to validate the type of a provided value by using appropriate node +definition. Node type are available for: + +* scalar +* boolean +* array +* variable (no validation) + +and are created with ``node($name, $type)`` or their associated shortcuts +``xxxxNode($name)`` method. + Array nodes ~~~~~~~~~~~