NodeBuilder
in package
implements
NodeParentInterface
This class provides a fluent interface for building a node.
Tags
Interfaces, Classes and Traits
- NodeParentInterface
- An interface that must be implemented by all node parents.
Table of Contents
- $nodeMapping : mixed
- $parent : mixed
- __construct() : mixed
- append() : $this
- Appends a node definition.
- arrayNode() : ArrayNodeDefinition
- Creates a child array node.
- booleanNode() : BooleanNodeDefinition
- Creates a child Boolean node.
- end() : NodeDefinition|ParentNodeDefinitionInterface
- Returns the parent node.
- enumNode() : EnumNodeDefinition
- Creates a child EnumNode.
- floatNode() : FloatNodeDefinition
- Creates a child float node.
- integerNode() : IntegerNodeDefinition
- Creates a child integer node.
- node() : NodeDefinition
- Creates a child node.
- scalarNode() : ScalarNodeDefinition
- Creates a child scalar node.
- setNodeClass() : $this
- Adds or overrides a node Type.
- setParent() : $this
- Set the parent node.
- variableNode() : VariableNodeDefinition
- Creates a child variable node.
- getNodeClass() : string
- Returns the class name of the node definition.
Properties
$nodeMapping
protected
mixed
$nodeMapping
$parent
protected
mixed
$parent
Methods
__construct()
public
__construct() : mixed
Return values
mixed —append()
Appends a node definition.
public
append(NodeDefinition $node) : $this
Usage:
$node = new ArrayNodeDefinition('name') ->children() ->scalarNode('foo')->end() ->scalarNode('baz')->end() ->append($this->getBarNodeDefinition()) ->end() ;
Parameters
- $node : NodeDefinition
Return values
$this —arrayNode()
Creates a child array node.
public
arrayNode(string $name) : ArrayNodeDefinition
Parameters
- $name : string
Return values
ArrayNodeDefinition —booleanNode()
Creates a child Boolean node.
public
booleanNode(string $name) : BooleanNodeDefinition
Parameters
- $name : string
Return values
BooleanNodeDefinition —end()
Returns the parent node.
public
end() : NodeDefinition|ParentNodeDefinitionInterface
Return values
NodeDefinition|ParentNodeDefinitionInterface —enumNode()
Creates a child EnumNode.
public
enumNode(string $name) : EnumNodeDefinition
Parameters
- $name : string
Return values
EnumNodeDefinition —floatNode()
Creates a child float node.
public
floatNode(string $name) : FloatNodeDefinition
Parameters
- $name : string
Return values
FloatNodeDefinition —integerNode()
Creates a child integer node.
public
integerNode(string $name) : IntegerNodeDefinition
Parameters
- $name : string
Return values
IntegerNodeDefinition —node()
Creates a child node.
public
node(string|null $name, string $type) : NodeDefinition
Parameters
- $name : string|null
- $type : string
Tags
Return values
NodeDefinition —scalarNode()
Creates a child scalar node.
public
scalarNode(string $name) : ScalarNodeDefinition
Parameters
- $name : string
Return values
ScalarNodeDefinition —setNodeClass()
Adds or overrides a node Type.
public
setNodeClass(string $type, string $class) : $this
Parameters
- $type : string
-
The name of the type
- $class : string
-
The fully qualified name the node definition class
Return values
$this —setParent()
Set the parent node.
public
setParent([ParentNodeDefinitionInterface|null $parent = null ]) : $this
Parameters
- $parent : ParentNodeDefinitionInterface|null = null
Return values
$this —variableNode()
Creates a child variable node.
public
variableNode(string $name) : VariableNodeDefinition
Parameters
- $name : string
Return values
VariableNodeDefinition —getNodeClass()
Returns the class name of the node definition.
protected
getNodeClass(string $type) : string
Parameters
- $type : string