protected function marshall(QtiComponent $component)
    {
        $element = static::getDOMCradle()->createElement($component->getQtiClassName());

        $this->setDOMElementAttribute($element, 'identifier', $component->getIdentifier());

        $weightIdentifier = $component->getWeightIdentifier();
        if (!empty($weightIdentifier)) {
            $this->setDOMElementAttribute($element, 'weightIdentifier', $weightIdentifier);
        }

        return $element;
    }
protected function marshall(QtiComponent $component)
    {
        $element = static::getDOMCradle()->createElement($component->getQtiClassName());

        $this->setDOMElementAttribute($element, 'identifier', $component->getIdentifier());

        $weightIdentifier = $component->getWeightIdentifier();
        if (!empty($weightIdentifier)) {
            $this->setDOMElementAttribute($element, 'weightIdentifier', $weightIdentifier);
        }

        return $element;
    }
protected function marshall ( QtiComponent $ component ) { $ element = static :: getDOMCradle ( ) -> createElement ( $ component -> getQtiClassName ( ) ) ; $ this -> setDOMElementAttribute ( $ element , 'identifier' , $ component -> getIdentifier ( ) ) ; $ weightIdentifier = $ component -> getWeightIdentifier ( ) ; if ( ! empty ( $ weightIdentifier ) ) { $ this -> setDOMElementAttribute ( $ element , 'weightIdentifier' , $ weightIdentifier ) ; } return $ element ; }
Marshall a Variable object into a DOMElement object.

@param \qtism\data\QtiComponent $component A Variable object.
@return \DOMElement The according DOMElement object.
Marshall a Variable object into a DOMElement object .