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

            $component = new UploadInteraction($responseIdentifier);

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

            if (($type = $this->getDOMElementAttributeAs($element, 'type')) !== null) {
                $component->setType($type);
            }

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

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

            return $component;

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

            $component = new UploadInteraction($responseIdentifier);

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

            if (($type = $this->getDOMElementAttributeAs($element, 'type')) !== null) {
                $component->setType($type);
            }

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

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

            return $component;

        } else {
            $msg = "The mandatory 'responseIdentifier' attribute is missing from the 'uploadInteraction' element.";
            throw new UnmarshallingException($msg, $element);
        }
    }
protected function unmarshall ( DOMElement $ element ) { if ( ( $ responseIdentifier = $ this -> getDOMElementAttributeAs ( $ element , 'responseIdentifier' ) ) !== null ) { $ component = new UploadInteraction ( $ responseIdentifier ) ; $ promptElts = $ this -> getChildElementsByTagName ( $ element , 'prompt' ) ; if ( count ( $ promptElts ) > 0 ) { $ promptElt = $ promptElts [ 0 ] ; $ prompt = $ this -> getMarshallerFactory ( ) -> createMarshaller ( $ promptElt ) -> unmarshall ( $ promptElt ) ; $ component -> setPrompt ( $ prompt ) ; } if ( ( $ type = $ this -> getDOMElementAttributeAs ( $ element , 'type' ) ) !== null ) { $ component -> setType ( $ type ) ; } if ( ( $ xmlBase = self :: getXmlBase ( $ element ) ) !== false ) { $ component -> setXmlBase ( $ xmlBase ) ; } $ this -> fillBodyElement ( $ component , $ element ) ; return $ component ; } else { $ msg = "The mandatory 'responseIdentifier' attribute is missing from the 'uploadInteraction' element." ; throw new UnmarshallingException ( $ msg , $ element ) ; } }
Unmarshall a DOMElement object corresponding to an uploadInteraction element.

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