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

            if (($title = $this->getDOMElementAttributeAs($element, 'title')) === null) {
                // The XSD does not restrict to an empty string, we then consider
                // the title as an empty string ('').
                $title = '';
            }

            $component = new EndAttemptInteraction($responseIdentifier, $title);

            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 'endAttemptInteraction' element.";
            throw new UnmarshallingException($msg, $element);
        }
    }
protected function unmarshall(DOMElement $element)
    {
        if (($responseIdentifier = $this->getDOMElementAttributeAs($element, 'responseIdentifier')) !== null) {

            if (($title = $this->getDOMElementAttributeAs($element, 'title')) === null) {
                // The XSD does not restrict to an empty string, we then consider
                // the title as an empty string ('').
                $title = '';
            }

            $component = new EndAttemptInteraction($responseIdentifier, $title);

            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 'endAttemptInteraction' element.";
            throw new UnmarshallingException($msg, $element);
        }
    }
protected function unmarshall ( DOMElement $ element ) { if ( ( $ responseIdentifier = $ this -> getDOMElementAttributeAs ( $ element , 'responseIdentifier' ) ) !== null ) { if ( ( $ title = $ this -> getDOMElementAttributeAs ( $ element , 'title' ) ) === null ) { // The XSD does not restrict to an empty string, we then consider // the title as an empty string (''). $ title = '' ; } $ component = new EndAttemptInteraction ( $ responseIdentifier , $ title ) ; 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 'endAttemptInteraction' element." ; throw new UnmarshallingException ( $ msg , $ element ) ; } }
Unmarshall a DOMElement object corresponding to an endAttemptInteraction element.

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