protected function unmarshall(DOMElement $element)
    {
        if (($name = $this->getDOMElementAttributeAs($element, 'name')) === null) {
            // XSD use="required" but can be empty.
            $name = '';
        }

        if (($value = $this->getDOMElementAttributeAs($element, 'value')) === null) {
            // XSD use="required" but can be empty.
            $value = '';
        }

        if (($valueType = $this->getDOMElementAttributeAs($element, 'valuetype')) !== null) {

            $component = new Param($name, $value, ParamType::getConstantByName($valueType));

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

            return $component;
        } else {
            $msg = "The mandatory attribute 'valueType' is missing from the 'param' element.";
            throw new UnmarshallingException($msg, $element);
        }
    }
protected function unmarshall(DOMElement $element)
    {
        if (($name = $this->getDOMElementAttributeAs($element, 'name')) === null) {
            // XSD use="required" but can be empty.
            $name = '';
        }

        if (($value = $this->getDOMElementAttributeAs($element, 'value')) === null) {
            // XSD use="required" but can be empty.
            $value = '';
        }

        if (($valueType = $this->getDOMElementAttributeAs($element, 'valuetype')) !== null) {

            $component = new Param($name, $value, ParamType::getConstantByName($valueType));

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

            return $component;
        } else {
            $msg = "The mandatory attribute 'valueType' is missing from the 'param' element.";
            throw new UnmarshallingException($msg, $element);
        }
    }
protected function unmarshall ( DOMElement $ element ) { if ( ( $ name = $ this -> getDOMElementAttributeAs ( $ element , 'name' ) ) === null ) { // XSD use="required" but can be empty. $ name = '' ; } if ( ( $ value = $ this -> getDOMElementAttributeAs ( $ element , 'value' ) ) === null ) { // XSD use="required" but can be empty. $ value = '' ; } if ( ( $ valueType = $ this -> getDOMElementAttributeAs ( $ element , 'valuetype' ) ) !== null ) { $ component = new Param ( $ name , $ value , ParamType :: getConstantByName ( $ valueType ) ) ; if ( ( $ type = $ this -> getDOMElementAttributeAs ( $ element , 'type' ) ) !== null ) { $ component -> setType ( $ type ) ; } return $ component ; } else { $ msg = "The mandatory attribute 'valueType' is missing from the 'param' element." ; throw new UnmarshallingException ( $ msg , $ element ) ; } }
Unmarshall a DOMElement object corresponding to an XHTML param element.

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