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

        if ($component->hasLowerBound() === true) {
            $this->setDOMElementAttribute($element, 'lowerBound', $component->getLowerBound());
        }

        if ($component->hasUpperBound() === true) {
            $this->setDOMElementAttribute($element, 'upperBound', $component->getUpperBound());
        }

        $this->setDOMElementAttribute($element, 'defaultValue', $component->getDefaultValue());

        foreach ($component->getMapEntries() as $mapEntry) {
            $marshaller = $this->getMarshallerFactory()->createMarshaller($mapEntry, array($this->getBaseType()));
            $element->appendChild($marshaller->marshall($mapEntry));
        }

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

        if ($component->hasLowerBound() === true) {
            $this->setDOMElementAttribute($element, 'lowerBound', $component->getLowerBound());
        }

        if ($component->hasUpperBound() === true) {
            $this->setDOMElementAttribute($element, 'upperBound', $component->getUpperBound());
        }

        $this->setDOMElementAttribute($element, 'defaultValue', $component->getDefaultValue());

        foreach ($component->getMapEntries() as $mapEntry) {
            $marshaller = $this->getMarshallerFactory()->createMarshaller($mapEntry, array($this->getBaseType()));
            $element->appendChild($marshaller->marshall($mapEntry));
        }

        return $element;
    }
protected function marshall ( QtiComponent $ component ) { $ element = static :: getDOMCradle ( ) -> createElement ( $ component -> getQtiClassName ( ) ) ; if ( $ component -> hasLowerBound ( ) === true ) { $ this -> setDOMElementAttribute ( $ element , 'lowerBound' , $ component -> getLowerBound ( ) ) ; } if ( $ component -> hasUpperBound ( ) === true ) { $ this -> setDOMElementAttribute ( $ element , 'upperBound' , $ component -> getUpperBound ( ) ) ; } $ this -> setDOMElementAttribute ( $ element , 'defaultValue' , $ component -> getDefaultValue ( ) ) ; foreach ( $ component -> getMapEntries ( ) as $ mapEntry ) { $ marshaller = $ this -> getMarshallerFactory ( ) -> createMarshaller ( $ mapEntry , array ( $ this -> getBaseType ( ) ) ) ; $ element -> appendChild ( $ marshaller -> marshall ( $ mapEntry ) ) ; } return $ element ; }
Marshall a Mapping object into a DOMElement object.

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