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

            $expressionElt = self::getFirstChildElement($element);

            if ($expressionElt !== false) {
                $exprMarshaller = $this->getMarshallerFactory()->createMarshaller($expressionElt);
                $expr = $exprMarshaller->unmarshall($expressionElt);
            } else {
                $msg = "Element '" . $element->localName . "' does not contain its mandatory expression.";
                throw new UnmarshallingException($msg, $element);
            }

            $object = new TemplateDefault($tplIdentifier, $expr);

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

            $expressionElt = self::getFirstChildElement($element);

            if ($expressionElt !== false) {
                $exprMarshaller = $this->getMarshallerFactory()->createMarshaller($expressionElt);
                $expr = $exprMarshaller->unmarshall($expressionElt);
            } else {
                $msg = "Element '" . $element->localName . "' does not contain its mandatory expression.";
                throw new UnmarshallingException($msg, $element);
            }

            $object = new TemplateDefault($tplIdentifier, $expr);

            return $object;
        } else {
            $msg = "The mandatory attribute 'templateIdentifier' is missing from element '" . $element->localName . "'.";
            throw new UnmarshallingException($msg, $element);
        }
    }
protected function unmarshall ( DOMElement $ element ) { if ( ( $ tplIdentifier = $ this -> getDOMElementAttributeAs ( $ element , 'templateIdentifier' ) ) !== null ) { $ expressionElt = self :: getFirstChildElement ( $ element ) ; if ( $ expressionElt !== false ) { $ exprMarshaller = $ this -> getMarshallerFactory ( ) -> createMarshaller ( $ expressionElt ) ; $ expr = $ exprMarshaller -> unmarshall ( $ expressionElt ) ; } else { $ msg = "Element '" . $ element -> localName . "' does not contain its mandatory expression." ; throw new UnmarshallingException ( $ msg , $ element ) ; } $ object = new TemplateDefault ( $ tplIdentifier , $ expr ) ; return $ object ; } else { $ msg = "The mandatory attribute 'templateIdentifier' is missing from element '" . $ element -> localName . "'." ; throw new UnmarshallingException ( $ msg , $ element ) ; } }
Unmarshall a DOMElement object corresponding to a QTI templateDefault element.

@param \DOMElement $element A DOMElement object.
@return \qtism\data\QtiComponent A templateDefault object.
@throws \qtism\data\storage\xml\marshalling\UnmarshallingException If the mandatory attribute 'templateIdentifier' is missing or has an unexpected number of expressions.
Unmarshall a DOMElement object corresponding to a QTI templateDefault element .