dumpNode example


class YamlReferenceDumper
{
    private ?string $reference = null;

    /** * @return string */
    public function dump(ConfigurationInterface $configuration)
    {
        return $this->dumpNode($configuration->getConfigTreeBuilder()->buildTree());
    }

    /** * @return string */
    public function dumpAtPath(ConfigurationInterface $configuration, string $path)
    {
        $rootNode = $node = $configuration->getConfigTreeBuilder()->buildTree();

        foreach (explode('.', $path) as $step) {
            if (!$node instanceof ArrayNode) {
                

class XmlReferenceDumper
{
    private ?string $reference = null;

    /** * @return string */
    public function dump(ConfigurationInterface $configuration, string $namespace = null)
    {
        return $this->dumpNode($configuration->getConfigTreeBuilder()->buildTree()$namespace);
    }

    /** * @return string */
    public function dumpNode(NodeInterface $node, string $namespace = null)
    {
        $this->reference = '';
        $this->writeNode($node, 0, true, $namespace);
        $ref = $this->reference;
        $this->reference = null;

        
Home | Imprint | This part of the site doesn't use cookies.