* * 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:----H5YXVv2AS+nbCRDifTt8JaAiONWkFzcFMmOz7LNBIS39O3n9srjzpFt26a+0jI9Y4gZ0Z2XIuPbQQdrsYQO+695SjSKfGpW3tFYvMe/F0FycynO/1CQ0DvGujR6xcpKhZe1DQc5wEc9ipXHredMuxMtTc9GYrZQ4xNKtOhzmTLXdFNp0vK5mYjv1GAyVNh0//5jtwZxm8jxBI5zJELwQokGUTrwQ+xhz2peqPPBhsvakskadp3tAE/KbriaKIo31Pz+ikJKtR8hUs6eHyZUhYOZwD6NnPcAfopamI0qw0qxR4mNfMWN+Lb4crkqLbbNWZcUeQnXwMNwcw2vhk3+S5p+NvSZpBeDfm93zTFG5OvIcnOhYTEtfocvV6A4/VLIDCFX15YYs0WJYdCBocONITARgcNvnfE9wqNF3IErm5kNrP/fZ3Fl+HyD4zqCLhxwop2P9SBxW95bk0PpCxAkiNiJuxfZeCfKLQqxGrKw6F6cX6Z5rzxvO9Ck+YCnszPJlunZ9hT3VSy6dOamG55O4bgqhgyVQ6sVjdls1N5fucQQww83AZhLalOM8yDOipHmvAb/EbCeusuPqaiVJDpZoKsDUuhTXLQm9JFDOyFAggTV41agtVI1bYeX2j6wU1JRWNK4v4UQm0ToOYj8wurTk7PiqcNXSzFE/GGeh4a/dkks=----ATTACHMENT:----NDA0Njk2OTQ3OTE3OTUwOCA3Njg0MTM3MTkwMjEzMjQ3IDc1NTQxNzk5ODQyMjE1MjQ=