protected function addCollectionNode(DOMElement $element, $value)
    {
        if ($element->childNodes->length === 0 && $element->attributes->length === 0) {
            $this->convertElement($element, $value);

            return;
        }

        $child = $this->document->createElement($element->tagName);
        $element->parentNode->appendChild($child);
        $this->convertElement($child, $value);
    }
protected function addCollectionNode(DOMElement $element, $value)
    {
        if ($element->childNodes->length === 0 && $element->attributes->length === 0) {
            $this->convertElement($element, $value);

            return;
        }

        $child = $this->document->createElement($element->tagName);
        $element->parentNode->appendChild($child);
        $this->convertElement($child, $value);
    }
protected function addCollectionNode ( DOMElement $ element , $ value ) { if ( $ element -> childNodes -> length === 0 && $ element -> attributes -> length === 0 ) { $ this -> convertElement ( $ element , $ value ) ; return ; } $ child = $ this -> document -> createElement ( $ element -> tagName ) ; $ element -> parentNode -> appendChild ( $ child ) ; $ this -> convertElement ( $ child , $ value ) ; }
Add collection node.

@param DOMElement $element
@param string|string[] $value

@internal param string $key
Add collection node .