protected function marshall(QtiComponent $component)
    {
        $element = parent::marshall($component);
        $baseType = $component->getBaseType();

        if ($component->getCorrectResponse() !== null) {
            $marshaller = $this->getMarshallerFactory()->createMarshaller($component->getCorrectResponse(), array($baseType));
            $element->appendChild($marshaller->marshall($component->getCorrectResponse()));
        }

        if ($component->getMapping() !== null) {
            $marshaller = $this->getMarshallerFactory()->createMarshaller($component->getMapping(), array($baseType));
            $element->appendChild($marshaller->marshall($component->getMapping()));
        }

        if ($component->getAreaMapping() !== null) {
            $marshaller = $this->getMarshallerFactory()->createMarshaller($component->getAreaMapping());
            $element->appendChild($marshaller->marshall($component->getAreaMapping()));
        }

        return $element;
    }
protected function marshall(QtiComponent $component)
    {
        $element = parent::marshall($component);
        $baseType = $component->getBaseType();

        if ($component->getCorrectResponse() !== null) {
            $marshaller = $this->getMarshallerFactory()->createMarshaller($component->getCorrectResponse(), array($baseType));
            $element->appendChild($marshaller->marshall($component->getCorrectResponse()));
        }

        if ($component->getMapping() !== null) {
            $marshaller = $this->getMarshallerFactory()->createMarshaller($component->getMapping(), array($baseType));
            $element->appendChild($marshaller->marshall($component->getMapping()));
        }

        if ($component->getAreaMapping() !== null) {
            $marshaller = $this->getMarshallerFactory()->createMarshaller($component->getAreaMapping());
            $element->appendChild($marshaller->marshall($component->getAreaMapping()));
        }

        return $element;
    }
protected function marshall ( QtiComponent $ component ) { $ element = parent :: marshall ( $ component ) ; $ baseType = $ component -> getBaseType ( ) ; if ( $ component -> getCorrectResponse ( ) !== null ) { $ marshaller = $ this -> getMarshallerFactory ( ) -> createMarshaller ( $ component -> getCorrectResponse ( ) , array ( $ baseType ) ) ; $ element -> appendChild ( $ marshaller -> marshall ( $ component -> getCorrectResponse ( ) ) ) ; } if ( $ component -> getMapping ( ) !== null ) { $ marshaller = $ this -> getMarshallerFactory ( ) -> createMarshaller ( $ component -> getMapping ( ) , array ( $ baseType ) ) ; $ element -> appendChild ( $ marshaller -> marshall ( $ component -> getMapping ( ) ) ) ; } if ( $ component -> getAreaMapping ( ) !== null ) { $ marshaller = $ this -> getMarshallerFactory ( ) -> createMarshaller ( $ component -> getAreaMapping ( ) ) ; $ element -> appendChild ( $ marshaller -> marshall ( $ component -> getAreaMapping ( ) ) ) ; } return $ element ; }
Marshall a ResponseDeclaration object into a DOMElement object.

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