protected function marshall(QtiComponent $component)
    {
        $element = self::getDOMCradle()->createElement('img');

        $this->setDOMElementAttribute($element, 'src', $component->getSrc());
        $this->setDOMElementAttribute($element, 'alt', $component->getAlt());

        if ($component->hasWidth() === true) {
            $this->setDOMElementAttribute($element, 'width', $component->getWidth());
        }

        if ($component->hasHeight() === true) {
            $this->setDOMElementAttribute($element, 'height', $component->getHeight());
        }

        if ($component->hasLongdesc() === true) {
            $this->setDOMElementAttribute($element, 'longdesc', $component->getLongdesc());
        }

        if ($component->hasXmlBase() === true) {
            self::setXmlBase($element, $component->getXmlBase());
        }

        $this->fillElement($element, $component);

        return $element;
    }
protected function marshall(QtiComponent $component)
    {
        $element = self::getDOMCradle()->createElement('img');

        $this->setDOMElementAttribute($element, 'src', $component->getSrc());
        $this->setDOMElementAttribute($element, 'alt', $component->getAlt());

        if ($component->hasWidth() === true) {
            $this->setDOMElementAttribute($element, 'width', $component->getWidth());
        }

        if ($component->hasHeight() === true) {
            $this->setDOMElementAttribute($element, 'height', $component->getHeight());
        }

        if ($component->hasLongdesc() === true) {
            $this->setDOMElementAttribute($element, 'longdesc', $component->getLongdesc());
        }

        if ($component->hasXmlBase() === true) {
            self::setXmlBase($element, $component->getXmlBase());
        }

        $this->fillElement($element, $component);

        return $element;
    }
protected function marshall ( QtiComponent $ component ) { $ element = self :: getDOMCradle ( ) -> createElement ( 'img' ) ; $ this -> setDOMElementAttribute ( $ element , 'src' , $ component -> getSrc ( ) ) ; $ this -> setDOMElementAttribute ( $ element , 'alt' , $ component -> getAlt ( ) ) ; if ( $ component -> hasWidth ( ) === true ) { $ this -> setDOMElementAttribute ( $ element , 'width' , $ component -> getWidth ( ) ) ; } if ( $ component -> hasHeight ( ) === true ) { $ this -> setDOMElementAttribute ( $ element , 'height' , $ component -> getHeight ( ) ) ; } if ( $ component -> hasLongdesc ( ) === true ) { $ this -> setDOMElementAttribute ( $ element , 'longdesc' , $ component -> getLongdesc ( ) ) ; } if ( $ component -> hasXmlBase ( ) === true ) { self :: setXmlBase ( $ element , $ component -> getXmlBase ( ) ) ; } $ this -> fillElement ( $ element , $ component ) ; return $ element ; }
Marshall an Img object into a DOMElement object.

@param \qtism\data\QtiComponent $component An Img object.
@return \DOMElement The according DOMElement object.
@throws \qtism\data\storage\xml\marshalling\MarshallingException
Marshall an Img object into a DOMElement object .