protected function marshall(QtiComponent $component)
    {
        $element = $this->createElement($component);
        $this->fillElement($element, $component);
        $this->setDOMElementAttribute($element, 'responseIdentifier', $component->getResponseIdentifier());

        if ($component->hasXmlBase() === true) {
            self::setXmlBase($element, $component->getXmlBase());
        }

        if ($component->hasPrompt() === true) {
            $element->appendChild($this->getMarshallerFactory()->createMarshaller($component->getPrompt())->marshall($component->getPrompt()));
        }

        $element->appendChild($this->getMarshallerFactory()->createMarshaller($component->getObject())->marshall($component->getObject()));

        return $element;
    }
protected function marshall(QtiComponent $component)
    {
        $element = $this->createElement($component);
        $this->fillElement($element, $component);
        $this->setDOMElementAttribute($element, 'responseIdentifier', $component->getResponseIdentifier());

        if ($component->hasXmlBase() === true) {
            self::setXmlBase($element, $component->getXmlBase());
        }

        if ($component->hasPrompt() === true) {
            $element->appendChild($this->getMarshallerFactory()->createMarshaller($component->getPrompt())->marshall($component->getPrompt()));
        }

        $element->appendChild($this->getMarshallerFactory()->createMarshaller($component->getObject())->marshall($component->getObject()));

        return $element;
    }
protected function marshall ( QtiComponent $ component ) { $ element = $ this -> createElement ( $ component ) ; $ this -> fillElement ( $ element , $ component ) ; $ this -> setDOMElementAttribute ( $ element , 'responseIdentifier' , $ component -> getResponseIdentifier ( ) ) ; if ( $ component -> hasXmlBase ( ) === true ) { self :: setXmlBase ( $ element , $ component -> getXmlBase ( ) ) ; } if ( $ component -> hasPrompt ( ) === true ) { $ element -> appendChild ( $ this -> getMarshallerFactory ( ) -> createMarshaller ( $ component -> getPrompt ( ) ) -> marshall ( $ component -> getPrompt ( ) ) ) ; } $ element -> appendChild ( $ this -> getMarshallerFactory ( ) -> createMarshaller ( $ component -> getObject ( ) ) -> marshall ( $ component -> getObject ( ) ) ) ; return $ element ; }
Marshall a DrawingInteraction object into a DOMElement object.

@param \qtism\data\QtiComponent $component A DrawingInteraction object.
@return \DOMElement The according DOMElement object.
@throws \qtism\data\storage\xml\marshalling\MarshallingException
Marshall a DrawingInteraction object into a DOMElement object .