protected function marshall(QtiComponent $component)
    {
        $element = parent::marshall($component);
        $version = $this->getVersion();
        
        if ($component->isParamVariable() === true) {
            $this->setDOMElementAttribute($element, 'paramVariable', true);
        } elseif (Version::compare($version, '2.0.0', '==') === true && $component->isParamVariable() === false) {
            $this->setDOMElementAttribute($element, 'paramVariable', false);
        }

        if ($component->isMathVariable() === true) {
            $this->setDOMElementAttribute($element, 'mathVariable', true);
        } elseif (Version::compare($version, '2.0.0', '==') === true && $component->isMathVariable() === false) {
            $this->setDOMElementAttribute($element, 'mathVariable', false);
        }

        return $element;
    }
protected function marshall(QtiComponent $component)
    {
        $element = parent::marshall($component);
        $version = $this->getVersion();
        
        if ($component->isParamVariable() === true) {
            $this->setDOMElementAttribute($element, 'paramVariable', true);
        } elseif (Version::compare($version, '2.0.0', '==') === true && $component->isParamVariable() === false) {
            $this->setDOMElementAttribute($element, 'paramVariable', false);
        }

        if ($component->isMathVariable() === true) {
            $this->setDOMElementAttribute($element, 'mathVariable', true);
        } elseif (Version::compare($version, '2.0.0', '==') === true && $component->isMathVariable() === false) {
            $this->setDOMElementAttribute($element, 'mathVariable', false);
        }

        return $element;
    }
protected function marshall ( QtiComponent $ component ) { $ element = parent :: marshall ( $ component ) ; $ version = $ this -> getVersion ( ) ; if ( $ component -> isParamVariable ( ) === true ) { $ this -> setDOMElementAttribute ( $ element , 'paramVariable' , true ) ; } elseif ( Version :: compare ( $ version , '2.0.0' , '==' ) === true && $ component -> isParamVariable ( ) === false ) { $ this -> setDOMElementAttribute ( $ element , 'paramVariable' , false ) ; } if ( $ component -> isMathVariable ( ) === true ) { $ this -> setDOMElementAttribute ( $ element , 'mathVariable' , true ) ; } elseif ( Version :: compare ( $ version , '2.0.0' , '==' ) === true && $ component -> isMathVariable ( ) === false ) { $ this -> setDOMElementAttribute ( $ element , 'mathVariable' , false ) ; } return $ element ; }
Marshall a TemplateDeclaration object into a DOMElement object.

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