/**
  * Marshall an AreaMapEntry object into a DOMElement object.
  *
  * @param \qtism\data\QtiComponent $component An AreaMapEntry object.
  * @return \DOMElement The according DOMElement object.
  */
 protected function marshall(QtiComponent $component)
 {
     $element = static::getDOMCradle()->createElement($component->getQtiClassName());
     self::setDOMElementAttribute($element, 'shape', Shape::getNameByConstant($component->getShape()));
     self::setDOMElementAttribute($element, 'coords', $component->getCoords());
     self::setDOMElementAttribute($element, 'mappedValue', $component->getMappedValue());
     return $element;
 }
 /**
  * Marshall a MapEntry object into a DOMElement object.
  * 
  * @param QtiComponent $component A MapEntry object.
  * @return DOMElement The according DOMElement object.
  */
 protected function marshall(QtiComponent $component)
 {
     $element = static::getDOMCradle()->createElement($component->getQtiClassName());
     self::setDOMElementAttribute($element, 'mapKey', $component->getMapKey());
     self::setDOMElementAttribute($element, 'mappedValue', $component->getMappedValue());
     self::setDOMElementAttribute($element, 'caseSensitive', $component->isCaseSensitive());
     return $element;
 }
Esempio n. 3
0
 /**
  * Marshall a MapEntry object into a DOMElement object.
  *
  * @param \qtism\data\QtiComponent $component A MapEntry object.
  * @return \DOMElement The according DOMElement object.
  */
 protected function marshall(QtiComponent $component)
 {
     $element = static::getDOMCradle()->createElement($component->getQtiClassName());
     self::setDOMElementAttribute($element, 'mapKey', $component->getMapKey());
     self::setDOMElementAttribute($element, 'mappedValue', $component->getMappedValue());
     if (Version::compare($this->getVersion(), '2.0.0', '>') === true) {
         self::setDOMElementAttribute($element, 'caseSensitive', $component->isCaseSensitive());
     }
     return $element;
 }