protected function __toSend($asDomElement = false)
    {
        /**
         * Create element tag.
         */
        $element = self::getDom()->createElement($this->getNamespacedName());
        $element->setAttributeNS('http://www.w3.org/2000/xmlns/', sprintf('xmlns:%s', $this->getNamespacePrefix()), $this->getNamespace());
        /*
         * Define element value
         * Add attributes if there are any
         */
        $this
            ->appendValueToElementToSend($this->getValue(), $element)
            ->appendAttributesToElementToSend($element)
        ;
        // Returns element content
        if ($asDomElement) {
            return $element;
        }

        return self::getDom()->saveXML($element);
    }
protected function __toSend($asDomElement = false)
    {
        /**
         * Create element tag.
         */
        $element = self::getDom()->createElement($this->getNamespacedName());
        $element->setAttributeNS('http://www.w3.org/2000/xmlns/', sprintf('xmlns:%s', $this->getNamespacePrefix()), $this->getNamespace());
        /*
         * Define element value
         * Add attributes if there are any
         */
        $this
            ->appendValueToElementToSend($this->getValue(), $element)
            ->appendAttributesToElementToSend($element)
        ;
        // Returns element content
        if ($asDomElement) {
            return $element;
        }

        return self::getDom()->saveXML($element);
    }
protected function __toSend ( $ asDomElement = false ) { /**
         * Create element tag.
         */ $ element = self :: getDom ( ) -> createElement ( $ this -> getNamespacedName ( ) ) ; $ element -> setAttributeNS ( 'http://www.w3.org/2000/xmlns/' , sprintf ( 'xmlns:%s' , $ this -> getNamespacePrefix ( ) ) , $ this -> getNamespace ( ) ) ; /*
         * Define element value
         * Add attributes if there are any
         */ $ this -> appendValueToElementToSend ( $ this -> getValue ( ) , $ element ) -> appendAttributesToElementToSend ( $ element ) ; // Returns element content if ( $ asDomElement ) { return $ element ; } return self :: getDom ( ) -> saveXML ( $ element ) ; }
Method called to generate the string XML request to be sent among the SOAP Header.

@param bool $asDomElement returns elements as a \DOMElement or as a string

@return \DOMElement|string
Method called to generate the string XML request to be sent among the SOAP Header .