src/Writer.php
private function appendDOMNode(\DOMDocument $dom, $node, $name, $value = null, $hasAttributes = false)
    {
        $element = $dom->createElement($name);

        if ($hasAttributes && $this->nodeValueKey === $name) {
            $this->setElementValue($dom, $node, $value);

            return;
        }

        $this->setElementValue($dom, $element, $value);
        $node->appendChild($element);
    }
private function appendDOMNode(\DOMDocument $dom, $node, $name, $value = null, $hasAttributes = false)
    {
        $element = $dom->createElement($name);

        if ($hasAttributes && $this->nodeValueKey === $name) {
            $this->setElementValue($dom, $node, $value);

            return;
        }

        $this->setElementValue($dom, $element, $value);
        $node->appendChild($element);
    }
private function appendDOMNode ( \ DOMDocument $ dom , $ node , $ name , $ value = null , $ hasAttributes = false ) { $ element = $ dom -> createElement ( $ name ) ; if ( $ hasAttributes && $ this -> nodeValueKey === $ name ) { $ this -> setElementValue ( $ dom , $ node , $ value ) ; return ; } $ this -> setElementValue ( $ dom , $ element , $ value ) ; $ node -> appendChild ( $ element ) ; }
Appends a dom node to the DOM.

@param DOMNode $node
@param string  $name
@param mixed   $value
@param bool $hasAttributes

@return void
Appends a dom node to the DOM .