protected function marshall(QtiComponent $component)
    {
        $version = $this->getVersion();
        $element = $this->createElement($component);
        $element->appendChild($this->getMarshallerFactory()->createMarshaller($component->getObject())->marshall($component->getObject()));
        $this->setDOMElementAttribute($element, 'responseIdentifier', $component->getResponseIdentifier());
        
        if ($component->getMaxChoices() > 0) {
            $this->setDOMElementAttribute($element, 'maxChoices', $component->getMaxChoices());
        }

        if (Version::compare($version, '2.1.0', '>=') === true && $component->hasMinChoices() === true) {
            $this->setDOMElementAttribute($element, 'minChoices', $component->getMinChoices());
        }

        if ($component->hasCenterPoint() === true) {
            $centerPoint = $component->getCenterPoint();
            $this->setDOMElementAttribute($element, 'centerPoint', $centerPoint->getX() . " " . $centerPoint->getY());
        }

        $this->fillElement($element, $component);

        return $element;
    }
protected function marshall(QtiComponent $component)
    {
        $version = $this->getVersion();
        $element = $this->createElement($component);
        $element->appendChild($this->getMarshallerFactory()->createMarshaller($component->getObject())->marshall($component->getObject()));
        $this->setDOMElementAttribute($element, 'responseIdentifier', $component->getResponseIdentifier());
        
        if ($component->getMaxChoices() > 0) {
            $this->setDOMElementAttribute($element, 'maxChoices', $component->getMaxChoices());
        }

        if (Version::compare($version, '2.1.0', '>=') === true && $component->hasMinChoices() === true) {
            $this->setDOMElementAttribute($element, 'minChoices', $component->getMinChoices());
        }

        if ($component->hasCenterPoint() === true) {
            $centerPoint = $component->getCenterPoint();
            $this->setDOMElementAttribute($element, 'centerPoint', $centerPoint->getX() . " " . $centerPoint->getY());
        }

        $this->fillElement($element, $component);

        return $element;
    }
protected function marshall ( QtiComponent $ component ) { $ version = $ this -> getVersion ( ) ; $ element = $ this -> createElement ( $ component ) ; $ element -> appendChild ( $ this -> getMarshallerFactory ( ) -> createMarshaller ( $ component -> getObject ( ) ) -> marshall ( $ component -> getObject ( ) ) ) ; $ this -> setDOMElementAttribute ( $ element , 'responseIdentifier' , $ component -> getResponseIdentifier ( ) ) ; if ( $ component -> getMaxChoices ( ) > 0 ) { $ this -> setDOMElementAttribute ( $ element , 'maxChoices' , $ component -> getMaxChoices ( ) ) ; } if ( Version :: compare ( $ version , '2.1.0' , '>=' ) === true && $ component -> hasMinChoices ( ) === true ) { $ this -> setDOMElementAttribute ( $ element , 'minChoices' , $ component -> getMinChoices ( ) ) ; } if ( $ component -> hasCenterPoint ( ) === true ) { $ centerPoint = $ component -> getCenterPoint ( ) ; $ this -> setDOMElementAttribute ( $ element , 'centerPoint' , $ centerPoint -> getX ( ) . " " . $ centerPoint -> getY ( ) ) ; } $ this -> fillElement ( $ element , $ component ) ; return $ element ; }
Marshall an PositionObjectInteraction object into a DOMElement object.

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