NodeBuilder
in package
implements
NodeParentInterface
This class provides a fluent interface for building a node.
Tags
Table of Contents
Interfaces
- NodeParentInterface
- An interface that must be implemented by all node parents.
Properties
- $nodeMapping : mixed
- $parent : mixed
Methods
- __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
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
$thisarrayNode()
Creates a child array node.
public
arrayNode(string $name) : ArrayNodeDefinition
Parameters
- $name : string
Return values
ArrayNodeDefinitionbooleanNode()
Creates a child Boolean node.
public
booleanNode(string $name) : BooleanNodeDefinition
Parameters
- $name : string
Return values
BooleanNodeDefinitionend()
Returns the parent node.
public
end() : NodeDefinition|ParentNodeDefinitionInterface
Return values
NodeDefinition|ParentNodeDefinitionInterfaceenumNode()
Creates a child EnumNode.
public
enumNode(string $name) : EnumNodeDefinition
Parameters
- $name : string
Return values
EnumNodeDefinitionfloatNode()
Creates a child float node.
public
floatNode(string $name) : FloatNodeDefinition
Parameters
- $name : string
Return values
FloatNodeDefinitionintegerNode()
Creates a child integer node.
public
integerNode(string $name) : IntegerNodeDefinition
Parameters
- $name : string
Return values
IntegerNodeDefinitionnode()
Creates a child node.
public
node(string|null $name, string $type) : NodeDefinition
Parameters
- $name : string|null
- $type : string
Tags
Return values
NodeDefinitionscalarNode()
Creates a child scalar node.
public
scalarNode(string $name) : ScalarNodeDefinition
Parameters
- $name : string
Return values
ScalarNodeDefinitionsetNodeClass()
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
$thissetParent()
Set the parent node.
public
setParent([ParentNodeDefinitionInterface $parent = null ]) : $this
Parameters
- $parent : ParentNodeDefinitionInterface = null
Return values
$thisvariableNode()
Creates a child variable node.
public
variableNode(string $name) : VariableNodeDefinition
Parameters
- $name : string
Return values
VariableNodeDefinitiongetNodeClass()
Returns the class name of the node definition.
protected
getNodeClass(string $type) : string
Parameters
- $type : string