protected function injectDom(\DOMDocument $dom, \DOMElement $target, \DOMNode $source)
    {
        if ($source->nodeType != XML_ELEMENT_NODE) {
            return;
        }
        $import = $dom->createElement($source->nodeName);

        foreach ($source->attributes as $attr) {
            $import->setAttribute($attr->name, $attr->value);
        }
        foreach ($source->childNodes as $child) {
            $this->injectDom($dom, $import, $child);
        }
        $target->appendChild($import);
    }
protected function injectDom(\DOMDocument $dom, \DOMElement $target, \DOMNode $source)
    {
        if ($source->nodeType != XML_ELEMENT_NODE) {
            return;
        }
        $import = $dom->createElement($source->nodeName);

        foreach ($source->attributes as $attr) {
            $import->setAttribute($attr->name, $attr->value);
        }
        foreach ($source->childNodes as $child) {
            $this->injectDom($dom, $import, $child);
        }
        $target->appendChild($import);
    }
protected function injectDom ( \ DOMDocument $ dom , \ DOMElement $ target , \ DOMNode $ source ) { if ( $ source -> nodeType != XML_ELEMENT_NODE ) { return ; } $ import = $ dom -> createElement ( $ source -> nodeName ) ; foreach ( $ source -> attributes as $ attr ) { $ import -> setAttribute ( $ attr -> name , $ attr -> value ) ; } foreach ( $ source -> childNodes as $ child ) { $ this -> injectDom ( $ dom , $ import , $ child ) ; } $ target -> appendChild ( $ import ) ; }
Import custom XML source node into WSDL document under specified target node
@param \DOMDocument $dom XML WSDL document being generated
@param \DOMElement $target XML node, to which will be appended $source node
@param \DOMNode $source Source XML node to be imported
Import custom XML source node into WSDL document under specified target node