public function unmarshall(DOMElement $element)
    {
        if (($responseIdentifier = $this->getDOMElementAttributeAs($element, 'responseIdentifier')) !== null) {
            
            if (($minConstraint = $this->getDOMElementAttributeAs($element, 'minConstraint', 'integer')) !== null) {
                
                if (($maxConstraint = $this->getDOMElementAttributeAs($element, 'maxConstraint', 'integer')) !== null) {
                    
                    if (($patternMask = $this->getDOMElementAttributeAs($element, 'patternMask')) === null) {
                        $patternMask = '';
                    }
                    try {
                        $component = new ResponseValidityConstraint($responseIdentifier, $minConstraint, $maxConstraint, $patternMask);
                    
                        // Find child associationValidityConstraint elements if any.
                        $associationValidityConstraintElts = $this->getChildElementsByTagName($element, 'associationValidityConstraint');
                            
                        foreach ($associationValidityConstraintElts as $associationValidityConstraintElt) {
                            $marshaller = $this->getMarshallerFactory()->createMarshaller($associationValidityConstraintElt);
                            $component->addAssociationValidityConstraint($marshaller->unmarshall($associationValidityConstraintElt));
                        }
                        
                        return $component;
                    } catch (InvalidArgumentException $e) {
                        throw new UnmarshallingException(
                            "An error occured while unmarshalling a 'responseValidityConstraint'. See chained exceptions for more information.",
                            $element,
                            $e
                        );
                    }
                    
                } else {
                    throw new UnmarshallingException(
                        "The mandatory 'maxConstraint' attribute is missing from element 'responseValididtyConstraint'.",
                        $element
                    );
                }
            } else {
                throw new UnmarshallingException(
                    "The mandatory 'minConstraint' attribute is missing from element 'responseValididtyConstraint'.",
                    $element
                );
            }
        } else {
            throw new UnmarshallingException(
                "The mandatory 'responseIdentifier' attribute is missing from element 'responseValididtyConstraint'.",
                $element
            );
        }
    }
public function unmarshall(DOMElement $element)
    {
        if (($responseIdentifier = $this->getDOMElementAttributeAs($element, 'responseIdentifier')) !== null) {
            
            if (($minConstraint = $this->getDOMElementAttributeAs($element, 'minConstraint', 'integer')) !== null) {
                
                if (($maxConstraint = $this->getDOMElementAttributeAs($element, 'maxConstraint', 'integer')) !== null) {
                    
                    if (($patternMask = $this->getDOMElementAttributeAs($element, 'patternMask')) === null) {
                        $patternMask = '';
                    }
                    try {
                        $component = new ResponseValidityConstraint($responseIdentifier, $minConstraint, $maxConstraint, $patternMask);
                    
                        // Find child associationValidityConstraint elements if any.
                        $associationValidityConstraintElts = $this->getChildElementsByTagName($element, 'associationValidityConstraint');
                            
                        foreach ($associationValidityConstraintElts as $associationValidityConstraintElt) {
                            $marshaller = $this->getMarshallerFactory()->createMarshaller($associationValidityConstraintElt);
                            $component->addAssociationValidityConstraint($marshaller->unmarshall($associationValidityConstraintElt));
                        }
                        
                        return $component;
                    } catch (InvalidArgumentException $e) {
                        throw new UnmarshallingException(
                            "An error occured while unmarshalling a 'responseValidityConstraint'. See chained exceptions for more information.",
                            $element,
                            $e
                        );
                    }
                    
                } else {
                    throw new UnmarshallingException(
                        "The mandatory 'maxConstraint' attribute is missing from element 'responseValididtyConstraint'.",
                        $element
                    );
                }
            } else {
                throw new UnmarshallingException(
                    "The mandatory 'minConstraint' attribute is missing from element 'responseValididtyConstraint'.",
                    $element
                );
            }
        } else {
            throw new UnmarshallingException(
                "The mandatory 'responseIdentifier' attribute is missing from element 'responseValididtyConstraint'.",
                $element
            );
        }
    }
public function unmarshall ( DOMElement $ element ) { if ( ( $ responseIdentifier = $ this -> getDOMElementAttributeAs ( $ element , 'responseIdentifier' ) ) !== null ) { if ( ( $ minConstraint = $ this -> getDOMElementAttributeAs ( $ element , 'minConstraint' , 'integer' ) ) !== null ) { if ( ( $ maxConstraint = $ this -> getDOMElementAttributeAs ( $ element , 'maxConstraint' , 'integer' ) ) !== null ) { if ( ( $ patternMask = $ this -> getDOMElementAttributeAs ( $ element , 'patternMask' ) ) === null ) { $ patternMask = '' ; } try { $ component = new ResponseValidityConstraint ( $ responseIdentifier , $ minConstraint , $ maxConstraint , $ patternMask ) ; // Find child associationValidityConstraint elements if any. $ associationValidityConstraintElts = $ this -> getChildElementsByTagName ( $ element , 'associationValidityConstraint' ) ; foreach ( $ associationValidityConstraintElts as $ associationValidityConstraintElt ) { $ marshaller = $ this -> getMarshallerFactory ( ) -> createMarshaller ( $ associationValidityConstraintElt ) ; $ component -> addAssociationValidityConstraint ( $ marshaller -> unmarshall ( $ associationValidityConstraintElt ) ) ; } return $ component ; } catch ( InvalidArgumentException $ e ) { throw new UnmarshallingException ( "An error occured while unmarshalling a 'responseValidityConstraint'. See chained exceptions for more information." , $ element , $ e ) ; } } else { throw new UnmarshallingException ( "The mandatory 'maxConstraint' attribute is missing from element 'responseValididtyConstraint'." , $ element ) ; } } else { throw new UnmarshallingException ( "The mandatory 'minConstraint' attribute is missing from element 'responseValididtyConstraint'." , $ element ) ; } } else { throw new UnmarshallingException ( "The mandatory 'responseIdentifier' attribute is missing from element 'responseValididtyConstraint'." , $ element ) ; } }
Unmarshall a DOMElement to its ResponseValidityConstraint data model representation.

@param \DOMElement $element
@return \qtism\data\QtiComponent A ResponseValidityConstraint object.
@throws \qtism\data\storage\xml\marshalling\UnmarshallingException
Unmarshall a DOMElement to its ResponseValidityConstraint data model representation .