protected function unmarshall(DOMElement $element)
    {
        if (($identifier = $this->getDOMElementAttributeAs($element, 'identifier')) !== null) {
            $expressionElt = self::getFirstChildElement($element);

            if ($expressionElt !== false) {
                $marshaller = $this->getMarshallerFactory()->createMarshaller($expressionElt);
                $object = new SetTemplateValue($identifier, $marshaller->unmarshall($expressionElt));

                return $object;
            } else {
                $msg = "The mandatory child element 'expression' is missing from element 'setTemplateValue'.";
                throw new UnmarshallingException($msg, $element);
            }
        } else {
            $msg = "The mandatory attribute 'identifier' is missing from element 'setTemplateValue'.";
            throw new UnmarshallingException($msg, $element);
        }
    }
protected function unmarshall(DOMElement $element)
    {
        if (($identifier = $this->getDOMElementAttributeAs($element, 'identifier')) !== null) {
            $expressionElt = self::getFirstChildElement($element);

            if ($expressionElt !== false) {
                $marshaller = $this->getMarshallerFactory()->createMarshaller($expressionElt);
                $object = new SetTemplateValue($identifier, $marshaller->unmarshall($expressionElt));

                return $object;
            } else {
                $msg = "The mandatory child element 'expression' is missing from element 'setTemplateValue'.";
                throw new UnmarshallingException($msg, $element);
            }
        } else {
            $msg = "The mandatory attribute 'identifier' is missing from element 'setTemplateValue'.";
            throw new UnmarshallingException($msg, $element);
        }
    }
protected function unmarshall ( DOMElement $ element ) { if ( ( $ identifier = $ this -> getDOMElementAttributeAs ( $ element , 'identifier' ) ) !== null ) { $ expressionElt = self :: getFirstChildElement ( $ element ) ; if ( $ expressionElt !== false ) { $ marshaller = $ this -> getMarshallerFactory ( ) -> createMarshaller ( $ expressionElt ) ; $ object = new SetTemplateValue ( $ identifier , $ marshaller -> unmarshall ( $ expressionElt ) ) ; return $ object ; } else { $ msg = "The mandatory child element 'expression' is missing from element 'setTemplateValue'." ; throw new UnmarshallingException ( $ msg , $ element ) ; } } else { $ msg = "The mandatory attribute 'identifier' is missing from element 'setTemplateValue'." ; throw new UnmarshallingException ( $ msg , $ element ) ; } }
Unmarshall a DOMElement object corresponding to a QTI setTemplateValue element.

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