protected function unmarshall(DOMElement $element)
    {
        if (($responseIdentifier = $this->getDOMElementAttributeAs($element, 'responseIdentifier')) !== null) {

            if (($lowerBound = $this->getDOMElementAttributeAs($element, 'lowerBound', 'float')) !== null) {

                if (($upperBound = $this->getDOMElementAttributeAs($element, 'upperBound', 'float')) !== null) {

                    $component = new SliderInteraction($responseIdentifier, $lowerBound, $upperBound);

                    $promptElts = $this->getChildElementsByTagName($element, 'prompt');
                    if (count($promptElts) > 0) {
                        $promptElt = $promptElts[0];
                        $prompt = $this->getMarshallerFactory()->createMarshaller($promptElt)->unmarshall($promptElt);
                        $component->setPrompt($prompt);
                    }

                    if (($step = $this->getDOMElementAttributeAs($element, 'step', 'integer')) !== null) {
                        $component->setStep($step);
                    }

                    if (($stepLabel = $this->getDOMElementAttributeAs($element, 'stepLabel', 'boolean')) !== null) {
                        $component->setStepLabel($stepLabel);
                    }

                    if (($orientation = $this->getDOMElementAttributeAs($element, 'orientation')) !== null) {
                        try {
                            $component->setOrientation(Orientation::getConstantByName($orientation));
                        } catch (InvalidArgumentException $e) {
                            $msg = "The value of the 'orientation' attribute of the 'sliderInteraction' is invalid.";
                            throw new UnmarshallingException($msg, $element, $e);
                        }
                    }

                    if (($reverse = $this->getDOMElementAttributeAs($element, 'reverse', 'boolean')) !== null) {
                        $component->setReverse($reverse);
                    }

                    if (($xmlBase = self::getXmlBase($element)) !== false) {
                        $component->setXmlBase($xmlBase);
                    }

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

                    return $component;
                } else {
                    $msg = "The mandatory 'upperBound' attribute is missing from the 'sliderInteraction' element.";
                    throw new UnmarshallingException($msg, $element);
                }
            } else {
                $msg = "The mandatory 'lowerBound' attribute is missing from the 'sliderInteraction' element.";
                throw new UnmarshallingException($msg, $element);
            }
        } else {
            $msg = "The mandatory 'responseIdentifier' attribute is missing from the 'sliderInteraction' element.";
            throw new UnmarshallingException($msg, $element);
        }
    }
protected function unmarshall(DOMElement $element)
    {
        if (($responseIdentifier = $this->getDOMElementAttributeAs($element, 'responseIdentifier')) !== null) {

            if (($lowerBound = $this->getDOMElementAttributeAs($element, 'lowerBound', 'float')) !== null) {

                if (($upperBound = $this->getDOMElementAttributeAs($element, 'upperBound', 'float')) !== null) {

                    $component = new SliderInteraction($responseIdentifier, $lowerBound, $upperBound);

                    $promptElts = $this->getChildElementsByTagName($element, 'prompt');
                    if (count($promptElts) > 0) {
                        $promptElt = $promptElts[0];
                        $prompt = $this->getMarshallerFactory()->createMarshaller($promptElt)->unmarshall($promptElt);
                        $component->setPrompt($prompt);
                    }

                    if (($step = $this->getDOMElementAttributeAs($element, 'step', 'integer')) !== null) {
                        $component->setStep($step);
                    }

                    if (($stepLabel = $this->getDOMElementAttributeAs($element, 'stepLabel', 'boolean')) !== null) {
                        $component->setStepLabel($stepLabel);
                    }

                    if (($orientation = $this->getDOMElementAttributeAs($element, 'orientation')) !== null) {
                        try {
                            $component->setOrientation(Orientation::getConstantByName($orientation));
                        } catch (InvalidArgumentException $e) {
                            $msg = "The value of the 'orientation' attribute of the 'sliderInteraction' is invalid.";
                            throw new UnmarshallingException($msg, $element, $e);
                        }
                    }

                    if (($reverse = $this->getDOMElementAttributeAs($element, 'reverse', 'boolean')) !== null) {
                        $component->setReverse($reverse);
                    }

                    if (($xmlBase = self::getXmlBase($element)) !== false) {
                        $component->setXmlBase($xmlBase);
                    }

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

                    return $component;
                } else {
                    $msg = "The mandatory 'upperBound' attribute is missing from the 'sliderInteraction' element.";
                    throw new UnmarshallingException($msg, $element);
                }
            } else {
                $msg = "The mandatory 'lowerBound' attribute is missing from the 'sliderInteraction' element.";
                throw new UnmarshallingException($msg, $element);
            }
        } else {
            $msg = "The mandatory 'responseIdentifier' attribute is missing from the 'sliderInteraction' element.";
            throw new UnmarshallingException($msg, $element);
        }
    }
protected function unmarshall ( DOMElement $ element ) { if ( ( $ responseIdentifier = $ this -> getDOMElementAttributeAs ( $ element , 'responseIdentifier' ) ) !== null ) { if ( ( $ lowerBound = $ this -> getDOMElementAttributeAs ( $ element , 'lowerBound' , 'float' ) ) !== null ) { if ( ( $ upperBound = $ this -> getDOMElementAttributeAs ( $ element , 'upperBound' , 'float' ) ) !== null ) { $ component = new SliderInteraction ( $ responseIdentifier , $ lowerBound , $ upperBound ) ; $ promptElts = $ this -> getChildElementsByTagName ( $ element , 'prompt' ) ; if ( count ( $ promptElts ) > 0 ) { $ promptElt = $ promptElts [ 0 ] ; $ prompt = $ this -> getMarshallerFactory ( ) -> createMarshaller ( $ promptElt ) -> unmarshall ( $ promptElt ) ; $ component -> setPrompt ( $ prompt ) ; } if ( ( $ step = $ this -> getDOMElementAttributeAs ( $ element , 'step' , 'integer' ) ) !== null ) { $ component -> setStep ( $ step ) ; } if ( ( $ stepLabel = $ this -> getDOMElementAttributeAs ( $ element , 'stepLabel' , 'boolean' ) ) !== null ) { $ component -> setStepLabel ( $ stepLabel ) ; } if ( ( $ orientation = $ this -> getDOMElementAttributeAs ( $ element , 'orientation' ) ) !== null ) { try { $ component -> setOrientation ( Orientation :: getConstantByName ( $ orientation ) ) ; } catch ( InvalidArgumentException $ e ) { $ msg = "The value of the 'orientation' attribute of the 'sliderInteraction' is invalid." ; throw new UnmarshallingException ( $ msg , $ element , $ e ) ; } } if ( ( $ reverse = $ this -> getDOMElementAttributeAs ( $ element , 'reverse' , 'boolean' ) ) !== null ) { $ component -> setReverse ( $ reverse ) ; } if ( ( $ xmlBase = self :: getXmlBase ( $ element ) ) !== false ) { $ component -> setXmlBase ( $ xmlBase ) ; } $ this -> fillBodyElement ( $ component , $ element ) ; return $ component ; } else { $ msg = "The mandatory 'upperBound' attribute is missing from the 'sliderInteraction' element." ; throw new UnmarshallingException ( $ msg , $ element ) ; } } else { $ msg = "The mandatory 'lowerBound' attribute is missing from the 'sliderInteraction' element." ; throw new UnmarshallingException ( $ msg , $ element ) ; } } else { $ msg = "The mandatory 'responseIdentifier' attribute is missing from the 'sliderInteraction' element." ; throw new UnmarshallingException ( $ msg , $ element ) ; } }
Unmarshall a DOMElement object corresponding to a SliderInteraction element.

@param \DOMElement $element A DOMElement object.
@return \qtism\data\QtiComponent A SliderInteraction object.
@throws \qtism\data\storage\xml\marshalling\UnmarshallingException
Unmarshall a DOMElement object corresponding to a SliderInteraction element .