Marshall a SliderInteraction object into a DOMElement object.

@param \qtism\data\QtiComponent $component A SliderInteraction object.
@return \DOMElement The according DOMElement object.
@throws \qtism\data\storage\xml\marshalling\MarshallingException
199589
protected function marshall(QtiComponent $component)
    {
        $element = $this->createElement($component);
        $this->fillElement($element, $component);
        $this->setDOMElementAttribute($element, 'responseIdentifier', $component->getResponseIdentifier());
        $this->setDOMElementAttribute($element, 'lowerBound', $component->getLowerBound());
        $this->setDOMElementAttribute($element, 'upperBound', $component->getUpperBound());

        if ($component->hasStep() === true) {
            $this->setDOMElementAttribute($element, 'step', $component->getStep());
        }

        if ($component->mustStepLabel() === true) {
            $this->setDOMElementAttribute($element, 'stepLabel', true);
        }

        if ($component->getOrientation() === Orientation::VERTICAL) {
            $this->setDOMElementAttribute($element, 'orientation', Orientation::getNameByConstant(Orientation::VERTICAL));
        }

        if ($component->mustReverse() === true) {
            $this->setDOMElementAttribute($element, 'reverse', true);
        }

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

        if ($component->hasPrompt() === true) {
            $element->appendChild($this->getMarshallerFactory()->createMarshaller($component->getPrompt())->marshall($component->getPrompt()));
        }

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

        $this->setDOMElementAttribute($element, 'min', $component->getMin());
        $this->setDOMElementAttribute($element, 'max', $component->getMax());

        if ($component->getStep() !== 1) { // default value of the step attribute is 1.
            $this->setDOMElementAttribute($element, 'step', $component->getStep());
        }

        return $element;
    }
503289
public function getChildrenRenderings(QtiComponent $component)
    {
        $returnValue = array();

        foreach (array_reverse($component->getComponents()->getArrayCopy()) as $c) {

            if (count($this->getRenderingStack()) > 0) {
                list($renderedComponent, $rendering) = $this->getRenderingStack()->pop();

                if ($c === $renderedComponent) {
                    array_unshift($returnValue, $rendering);
                } else {
                    // repush...
                    $this->storeRendering($renderedComponent, $rendering);
                }
            }
        }

        return $returnValue;
    }
759051
public static XContentBuilder marshall(GatewayBean bean) throws StorageException {
        try (XContentBuilder builder = XContentFactory.jsonBuilder()) {
            preMarshall(bean);
            builder
                .startObject()
                    .field("id", bean.getId())
                    .field("name", bean.getName())
                    .field("description", bean.getDescription())
                    .field("type", bean.getType())
                    .field("configuration", bean.getConfiguration())
                    .field("createdBy", bean.getCreatedBy())
                    .field("createdOn", bean.getCreatedOn().getTime())
                    .field("modifiedBy", bean.getModifiedBy())
                    .field("modifiedOn", bean.getModifiedOn().getTime())
                .endObject();
            postMarshall(bean);
            return builder;
        } catch (IOException e) {
            throw new StorageException(e);
        }
    }
365972
final public function getComponent(string $componentName = null) : IColumnComponent
    {
        if ($componentName === null) {
            if ($this->hasSingleComponent()) {
                return reset($this->components);
            } else {
                throw InvalidArgumentException::format(
                    'Must supply component name for %s \'%s\' with more than one component: expecting one of (%s), null given',
                    static::$debugType, $this->name, Debug::formatValues(array_keys($this->components))
                );
            }
        }

        if (!isset($this->components[$componentName])) {
            throw InvalidArgumentException::format(
                'Invalid component name for %s \'%s\': expecting one of (%s), %s given',
                static::$debugType, $this->name, Debug::formatValues(array_keys($this->components)), $componentName
            );
        }

        return $this->components[$componentName];
    }
343040
protected function marshall(QtiComponent $component)
    {
        $element = self::getDOMCradle()->createElement('br');

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

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

        return $element;
    }
1374251
public function add(HtmlComponent $component)
    {
        if (isset($this->components[$component->id])) {
            throw new ZE(sprintf(ERROR_COMPONENT_ALREADY_EXISTS, $component->id, $this->id));
        }
        if (property_exists($this, $component->id)) {
            $id = strlen($this->id) > 0 ? $this->id : get_class($this);
            throw new ZE(sprintf(ERROR_COMPONENT_AS_PROPERTY, $component->id, $id));
        }

        $this->components[$component->id] = $component;
        $component->setOwner($this);
        $component->onAdded();
        return $component;
    }
984448
protected function marshall(QtiComponent $component)
    {
        $element = static::getDOMCradle()->createElement($component->getQtiClassName());

        $this->setDOMElementAttribute($element, 'mapKey', $component->getMapKey());
        $this->setDOMElementAttribute($element, 'mappedValue', $component->getMappedValue());
        
        if (Version::compare($this->getVersion(), '2.0.0', '>') === true) {
            $this->setDOMElementAttribute($element, 'caseSensitive', $component->isCaseSensitive());
        }

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

        $this->setDOMElementAttribute($element, 'identifier', $component->getIdentifier());

        return $element;
    }
653300
public function marshall()
    {
        $toMarshall = $this->getToMarshall();

        try {
            if ($toMarshall instanceof QtiCoords) {
                $this->marshallCoords();

                return;
            } elseif ($toMarshall instanceof QtiPair) {
                $this->marshallPair();

                return;
            } elseif ($toMarshall instanceof QtiDuration) {
                $this->marshallDuration();

                return;
            } elseif ($toMarshall instanceof QtiPoint) {
                $this->marshallPoint();

                return;
            } else if ($toMarshall instanceof QtiIdentifier) {
                $this->marshallIdentifier();
                
                return;
            }
        } catch (PhpMarshallingException $e) {
            $msg = "An error occured while marshalling a QtiDatatype object.";
            throw new PhpMarshallingException($msg, PhpMarshallingException::RUNTIME, $e);
        }

        $className = get_class($toMarshall);
        $msg = "Cannot deal with QtiDatatype '${className}'.";
        throw new PhpMarshallingException($msg, PhpMarshallingException::RUNTIME);
    }
1029945
protected function marshall(QtiComponent $component)
    {
        $element = $this->createElement($component);
        $this->fillElement($element, $component);
        $this->setDOMElementAttribute($element, 'responseIdentifier', $component->getResponseIdentifier());

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

        $xml = $component->getXml();
        Utils::importChildNodes($xml->documentElement, $element);
        Utils::importAttributes($xml->documentElement, $element);

        return $element;
    }
912719
protected function marshall(QtiComponent $component)
    {
        $element = self::getDOMCradle()->createElement('colgroup');
        $this->setDOMElementAttribute($element, 'span', $component->getSpan());

        foreach ($component->getContent() as $col) {
            $marshaller = $this->getMarshallerFactory()->createMarshaller($col);
            $element->appendChild($marshaller->marshall($col));
        }

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

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

        $this->setDOMElementAttribute($element, 'identifier', $component->getIdentifier());
        $this->setDOMElementAttribute($element, 'title', $component->getTitle());
        $this->setDOMElementAttribute($element, 'timeDependent', $component->isTimeDependent());
        $this->setDOMElementAttribute($element, 'adaptive', $component->isAdaptive());

        if ($component->hasLang() === true) {
            $this->setDOMElementAttribute($element, 'lang', $component->getLang());
        }

        if ($component->hasLabel() === true) {
            $this->setDOMElementAttribute($element, 'label', $component->getLabel());
        }

        if ($component->hasToolName() === true) {
            $this->setDOMElementAttribute($element, 'toolName', $component->getToolName());
        }

        if ($component->hasToolVersion() === true) {
            $this->setDOMElementAttribute($element, 'toolVersion', $component->getToolVersion());
        }

        foreach ($component->getResponseDeclarations() as $responseDeclaration) {
            $marshaller = $this->getMarshallerFactory()->createMarshaller($responseDeclaration);
            $element->appendChild($marshaller->marshall($responseDeclaration));
        }

        foreach ($component->getOutcomeDeclarations() as $outcomeDeclaration) {
            $marshaller = $this->getMarshallerFactory()->createMarshaller($outcomeDeclaration);
            $element->appendChild($marshaller->marshall($outcomeDeclaration));
        }

        foreach ($component->getTemplateDeclarations() as $templateDeclaration) {
            $marshaller = $this->getMarshallerFactory()->createMarshaller($templateDeclaration);
            $element->appendChild($marshaller->marshall($templateDeclaration));
        }

        if ($component->hasTemplateProcessing() === true) {
            $marshaller = $this->getMarshallerFactory()->createMarshaller($component->getTemplateProcessing());
            $element->appendChild($marshaller->marshall($component->getTemplateProcessing()));
        }

        foreach ($component->getStylesheets() as $stylesheet) {
            $marshaller = $this->getMarshallerFactory()->createMarshaller($stylesheet);
            $element->appendChild($marshaller->marshall($stylesheet));
        }

        if ($component->hasItemBody() === true) {
            $itemBody = $component->getItemBody();
            $marshaller = $this->getMarshallerFactory()->createMarshaller($itemBody);
            $element->appendChild($marshaller->marshall($itemBody));
        }

        if ($component->hasResponseProcessing() === true) {
            $marshaller = $this->getMarshallerFactory()->createMarshaller($component->getResponseProcessing());
            $element->appendChild($marshaller->marshall($component->getResponseProcessing()));
        }

        foreach ($component->getModalFeedbacks() as $modalFeedback) {
            $marshaller = $this->getMarshallerFactory()->createMarshaller($modalFeedback);
            $element->appendChild($marshaller->marshall($modalFeedback));
        }

        return $element;
    }
263127
protected function marshall(QtiComponent $component)
    {
        $element = static::getDOMCradle()->createElement($component->getQtiClassName());
        $this->setDOMElementAttribute($element, 'responseIdentifier', $component->getResponseIdentifier());
        
        foreach ($component->getShufflingGroups() as $shufflingGroup) {
            $marshaller = $this->getMarshallerFactory()->createMarshaller($shufflingGroup);
            $element->appendChild($marshaller->marshall($shufflingGroup));
        }

        return $element;
    }
546635
protected function parseVCalendarComponents(Component $parentComponent)
    {
        foreach ($this->pointer['value'] ?: [] as $children) {
            switch (static::getTagName($children['name'])) {
                case 'properties':
                    $this->pointer = &$children['value'];
                    $this->parseProperties($parentComponent);
                    break;

                case 'components':
                    $this->pointer = &$children;
                    $this->parseComponent($parentComponent);
                    break;
            }
        }
    }
31318
protected function marshall(QtiComponent $component)
    {
        $element = static::getDOMCradle()->createElement($component->getQtiClassName());

        $this->setDOMElementAttribute($element, 'shape', QtiShape::getNameByConstant($component->getShape()));
        $this->setDOMElementAttribute($element, 'coords', $component->getCoords());
        $this->setDOMElementAttribute($element, 'mappedValue', $component->getMappedValue());

        return $element;
    }
420747
protected function marshall(QtiComponent $component)
    {
        $element = static::getDOMCradle()->createElement($component->getQtiClassName());
        foreach ($component->getInterpolationTableEntries() as $interpolationTableEntry) {
            $marshaller = $this->getMarshallerFactory()->createMarshaller($interpolationTableEntry, array($this->getBaseType()));
            $element->appendChild($marshaller->marshall($interpolationTableEntry));
        }

        if ($component->getDefaultValue() !== null) {
            $this->setDOMElementAttribute($element, 'defaultValue', $component->getDefaultValue());
        }

        return $element;
    }