class TreeBuilder implements NodeParentInterface

This is the entry class for building a config tree.

Properties

protected $tree
protected $root

Methods

__construct(string $name = null, string $type = 'array', NodeBuilder $builder = null)

No description

root(string $name, string $type = 'array', NodeBuilder $builder = null)

Creates the root node.

getRootNode()

No description

buildTree()

Builds the tree.

setPathSeparator(string $separator)

No description

Details

at line 27
__construct(string $name = null, string $type = 'array', NodeBuilder $builder = null)

Parameters

string $name
string $type
NodeBuilder $builder

at line 47
ArrayNodeDefinition|NodeDefinition root(string $name, string $type = 'array', NodeBuilder $builder = null)

Creates the root node.

Parameters

string $name The name of the root node
string $type The type of the root node
NodeBuilder $builder A custom node builder instance

Return Value

ArrayNodeDefinition|NodeDefinition The root node (as an ArrayNodeDefinition when the type is 'array')

Exceptions

RuntimeException When the node type is not supported

at line 54
NodeDefinition getRootNode()

Return Value

NodeDefinition

at line 70
NodeInterface buildTree()

Builds the tree.

Return Value

NodeInterface

Exceptions

RuntimeException

at line 80
setPathSeparator(string $separator)

Parameters

string $separator