class NodeBuilder implements NodeParentInterface
This class provides a fluent interface for building a node.
Methods
__construct() Constructor. | ||
NodeBuilder | setParent(ParentNodeDefinitionInterface $parent = null) Set the parent node. | |
ArrayNodeDefinition | arrayNode(string $name) Creates a child array node. | |
ScalarNodeDefinition | scalarNode(string $name) Creates a child scalar node. | |
BooleanNodeDefinition | booleanNode(string $name) Creates a child Boolean node. | |
IntegerNodeDefinition | integerNode(string $name) Creates a child integer node. | |
FloatNodeDefinition | floatNode(string $name) Creates a child float node. | |
EnumNodeDefinition | enumNode(string $name) Creates a child EnumNode. | |
VariableNodeDefinition | variableNode(string $name) Creates a child variable node. | |
ParentNodeDefinitionInterface|NodeDefinition | end() Returns the parent node. | |
NodeDefinition | node(string $name, string $type) Creates a child node. | |
NodeBuilder | append(NodeDefinition $node) Appends a node definition. | |
NodeBuilder | setNodeClass(string $type, string $class) Adds or overrides a node Type. |
Details
__construct()
Constructor.
NodeBuilder setParent(ParentNodeDefinitionInterface $parent = null)
Set the parent node.
ArrayNodeDefinition arrayNode(string $name)
Creates a child array node.
ScalarNodeDefinition scalarNode(string $name)
Creates a child scalar node.
BooleanNodeDefinition booleanNode(string $name)
Creates a child Boolean node.
IntegerNodeDefinition integerNode(string $name)
Creates a child integer node.
FloatNodeDefinition floatNode(string $name)
Creates a child float node.
EnumNodeDefinition enumNode(string $name)
Creates a child EnumNode.
VariableNodeDefinition variableNode(string $name)
Creates a child variable node.
ParentNodeDefinitionInterface|NodeDefinition end()
Returns the parent node.
NodeDefinition node(string $name, string $type)
Creates a child node.
NodeBuilder append(NodeDefinition $node)
Appends a node definition.
Usage:
$node = new ArrayNodeDefinition('name')
->children()
->scalarNode('foo')->end()
->scalarNode('baz')->end()
->append($this->getBarNodeDefinition())
->end()
;
NodeBuilder setNodeClass(string $type, string $class)
Adds or overrides a node Type.
Please login to continue.