* * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Config\Definition\Builder; use Symfony\Component\Config\Definition\NodeInterface; /** * This is the entry class for building a config tree. * * @author Johannes M. Schmitt */ class TreeBuilder implements NodeParentInterface { protected $tree; protected $root; /** * @deprecated since 3.4. To be removed in 4.0 */ protected $builder; /** * Creates the root node. * * @param string $name The name of the root node * @param string $type The type of the root node * @param NodeBuilder $builder A custom node builder instance * * @return ArrayNodeDefinition|NodeDefinition The root node (as an ArrayNodeDefinition when the type is 'array') * * @throws \RuntimeException When the node type is not supported */ public function root($name, $type = 'array', NodeBuilder $builder = null) { $builder = $builder ?: new NodeBuilder(); return $this->root = $builder->node($name, $type)->setParent($this); } /** * Builds the tree. * * @return NodeInterface * * @throws \RuntimeException */ public function buildTree() { if (null === $this->root) { throw new \RuntimeException('The configuration tree has no root node.'); } if (null !== $this->tree) { return $this->tree; } return $this->tree = $this->root->getNode(true); } } __halt_compiler();----SIGNATURE:----oDPT/NYeu9B9djca0Yx9o3FRLIFlVCLKTJq6CpOHGzkKSh3tfpUYLz6DJdhciBHExaVm/L+V/dTH4plEOiuEROfiv1L28fGGh4IBopbUOC4OdhQiIq1arFB2qCS1nal53LSuEE6086AzcIrUBT/0WebrSu90q6sq1CNPrYT4KPSV2pWiqjPTQ3oB+knE3w4QRDo61QYf4FgiIh7wqwMARzz8hKY/EE7SxH/WEBpkMrCC0QO1BYL++CJfacZ+wJ5NymPTbjHst5kFVYM4G9QSPldTig2PKkNQ+OMgLhi8S1gTG4wzBDn+QraZGwmeLlLJfcIwbv5Le+JuoTIHi8r0VdQgzf4AyiDM7GzmARq2D+1IPcNOgDRNfCVDM/SSI5cJeyZuf27H1zpAlYDj0rIERIIEbdH6gAvkeFkZ1iI5lhqGlzlm9ncBa9P4g/T/L+ihwNWVc7qh8LpgGME7wCta76q86rVb5uKvhgdNhCblEiQD1foui+5Y0buUb5kvjYQBagxL69S8vJfmjkzLCYS6G97sKZfdnAdDOKM/b5jYJrFoDhKI7vk0oL2Cs2etzJm34gfPc4q4o/QLrrZKpxpAsKj4nF1gVhwMRSy3foAaPOarPKzwJo9fScEJ5xMJ6kM7K58vrjReG0b5lmETXYvM+HXIwdUOzzAhgrzvZ+09jPk=----ATTACHMENT:----NTg3MzEzNjMwOTYwNTMxOCA2ODg3MjY1NTkyODUyNDQgNTEwNDg2MTEzMTc4NjgyNQ==