protected function unmarshall(DOMElement $element)
    {
        if (($identifier = $this->getDOMElementAttributeAs($element, 'identifier')) !== null) {
            $object = new Variable($identifier);

            if (($weightIdentifier = $this->getDOMElementAttributeAs($element, 'weightIdentifier')) !== null) {
                $object->setWeightIdentifier($weightIdentifier);
            }

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

            if (($weightIdentifier = $this->getDOMElementAttributeAs($element, 'weightIdentifier')) !== null) {
                $object->setWeightIdentifier($weightIdentifier);
            }

            return $object;
        } else {
            $msg = "The mandatory attribute 'identifier' is missing from element '" . $element->localName . "'.";
            throw new UnmarshallingException($msg, $element);
        }
    }
protected function unmarshall ( DOMElement $ element ) { if ( ( $ identifier = $ this -> getDOMElementAttributeAs ( $ element , 'identifier' ) ) !== null ) { $ object = new Variable ( $ identifier ) ; if ( ( $ weightIdentifier = $ this -> getDOMElementAttributeAs ( $ element , 'weightIdentifier' ) ) !== null ) { $ object -> setWeightIdentifier ( $ weightIdentifier ) ; } return $ object ; } else { $ msg = "The mandatory attribute 'identifier' is missing from element '" . $ element -> localName . "'." ; throw new UnmarshallingException ( $ msg , $ element ) ; } }
Unmarshall a DOMElement object corresponding to a QTI Variable element.

@param \DOMElement $element A DOMElement object.
@return \qtism\data\QtiComponent A Variable object.
@throws \qtism\data\storage\xml\marshalling\UnmarshallingException If the mandatory attribute 'identifier' is not set in $element.
Unmarshall a DOMElement object corresponding to a QTI Variable element .