public function toNode(DOMDocument $document = null)
    {
        if (null === $document) {
            $document = new DOMDocument();
        }

        $node = $document->createElement('DeliveryTimeInformation');
        $node->appendChild($document->createElement('PackageBillType', $this->getPackageBillType()));

        if ($this->getPickup() !== null) {
            $node->appendChild($this->getPickup()->toNode($document));
        }

        return $node;
    }
public function toNode(DOMDocument $document = null)
    {
        if (null === $document) {
            $document = new DOMDocument();
        }

        $node = $document->createElement('DeliveryTimeInformation');
        $node->appendChild($document->createElement('PackageBillType', $this->getPackageBillType()));

        if ($this->getPickup() !== null) {
            $node->appendChild($this->getPickup()->toNode($document));
        }

        return $node;
    }
public function toNode ( DOMDocument $ document = null ) { if ( null === $ document ) { $ document = new DOMDocument ( ) ; } $ node = $ document -> createElement ( 'DeliveryTimeInformation' ) ; $ node -> appendChild ( $ document -> createElement ( 'PackageBillType' , $ this -> getPackageBillType ( ) ) ) ; if ( $ this -> getPickup ( ) !== null ) { $ node -> appendChild ( $ this -> getPickup ( ) -> toNode ( $ document ) ) ; } return $ node ; }
@param null|DOMDocument $document

@return DOMElement
@param null|DOMDocument $document