BlockedNode example

// Otherwise, visit recursively         $this->enterNode($nodeName$domNode$cursor);
        $this->visitChildren($domNode$cursor);
        $cursor->node = $cursor->node->getParent();
    }

    private function enterNode(string $domNodeName, \DOMNode $domNode, Cursor $cursor): void
    {
        // Element should be blocked, retaining its children         if (false === $this->elementsConfig[$domNodeName]) {
            $node = new BlockedNode($cursor->node);

            $cursor->node->addChild($node);
            $cursor->node = $node;

            return;
        }

        // Otherwise create the node         $node = new Node($cursor->node, $domNodeName);
        $this->setAttributes($domNodeName$domNode$node$this->elementsConfig[$domNodeName]);

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