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

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

        // A CorrectResponse contains 1..* Value objects
        foreach ($component->getValues() as $value) {
            $valueMarshaller = $this->getMarshallerFactory()->createMarshaller($value, array($this->getBaseType()));
            $valueElement = $valueMarshaller->marshall($value);
            $element->appendChild($valueElement);
        }

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

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

        // A CorrectResponse contains 1..* Value objects
        foreach ($component->getValues() as $value) {
            $valueMarshaller = $this->getMarshallerFactory()->createMarshaller($value, array($this->getBaseType()));
            $valueElement = $valueMarshaller->marshall($value);
            $element->appendChild($valueElement);
        }

        return $element;
    }
protected function marshall ( QtiComponent $ component ) { $ element = static :: getDOMCradle ( ) -> createElement ( $ component -> getQtiClassName ( ) ) ; $ interpretation = $ component -> getInterpretation ( ) ; if ( ! empty ( $ interpretation ) ) { $ this -> setDOMElementAttribute ( $ element , 'interpretation' , $ interpretation ) ; } // A CorrectResponse contains 1..* Value objects foreach ( $ component -> getValues ( ) as $ value ) { $ valueMarshaller = $ this -> getMarshallerFactory ( ) -> createMarshaller ( $ value , array ( $ this -> getBaseType ( ) ) ) ; $ valueElement = $ valueMarshaller -> marshall ( $ value ) ; $ element -> appendChild ( $ valueElement ) ; } return $ element ; }
Marshall a CorrectResponse object into a DOMElement object.

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