public function unmarshall(DOMElement $element)
    {
        if (($identifier = $this->getDOMElementAttributeAs($element, 'identifier')) !== null) {
            
            if (($minConstraint = $this->getDOMElementAttributeAs($element, 'minConstraint', 'integer')) !== null) {
                
                if (($maxConstraint = $this->getDOMElementAttributeAs($element, 'maxConstraint', 'integer')) !== null) {
                    
                    try {
                        return new AssociationValidityConstraint($identifier, $minConstraint, $maxConstraint);
                    } catch (InvalidArgumentException $e) {
                        throw new UnmarshallingException(
                            "An error occured while unmarshalling an 'associationValidityConstraint' element. See chained exceptions for more information.",
                            $element,
                            $e
                        );
                    }
                    
                } else {
                    throw new UnmarshallingException(
                        "The mandatory 'maxConstraint' attribute is missing from element 'associationValididtyConstraint'.",
                        $element
                    );
                }
            } else {
                throw new UnmarshallingException(
                    "The mandatory 'minConstraint' attribute is missing from element 'associationValididtyConstraint'.",
                    $element
                );
            }
        } else {
            throw new UnmarshallingException(
                "The mandatory 'identifier' attribute is missing from element 'associationValididtyConstraint'.",
                $element
            );
        }
    }
public function unmarshall(DOMElement $element)
    {
        if (($identifier = $this->getDOMElementAttributeAs($element, 'identifier')) !== null) {
            
            if (($minConstraint = $this->getDOMElementAttributeAs($element, 'minConstraint', 'integer')) !== null) {
                
                if (($maxConstraint = $this->getDOMElementAttributeAs($element, 'maxConstraint', 'integer')) !== null) {
                    
                    try {
                        return new AssociationValidityConstraint($identifier, $minConstraint, $maxConstraint);
                    } catch (InvalidArgumentException $e) {
                        throw new UnmarshallingException(
                            "An error occured while unmarshalling an 'associationValidityConstraint' element. See chained exceptions for more information.",
                            $element,
                            $e
                        );
                    }
                    
                } else {
                    throw new UnmarshallingException(
                        "The mandatory 'maxConstraint' attribute is missing from element 'associationValididtyConstraint'.",
                        $element
                    );
                }
            } else {
                throw new UnmarshallingException(
                    "The mandatory 'minConstraint' attribute is missing from element 'associationValididtyConstraint'.",
                    $element
                );
            }
        } else {
            throw new UnmarshallingException(
                "The mandatory 'identifier' attribute is missing from element 'associationValididtyConstraint'.",
                $element
            );
        }
    }
public function unmarshall ( DOMElement $ element ) { if ( ( $ identifier = $ this -> getDOMElementAttributeAs ( $ element , 'identifier' ) ) !== null ) { if ( ( $ minConstraint = $ this -> getDOMElementAttributeAs ( $ element , 'minConstraint' , 'integer' ) ) !== null ) { if ( ( $ maxConstraint = $ this -> getDOMElementAttributeAs ( $ element , 'maxConstraint' , 'integer' ) ) !== null ) { try { return new AssociationValidityConstraint ( $ identifier , $ minConstraint , $ maxConstraint ) ; } catch ( InvalidArgumentException $ e ) { throw new UnmarshallingException ( "An error occured while unmarshalling an 'associationValidityConstraint' element. See chained exceptions for more information." , $ element , $ e ) ; } } else { throw new UnmarshallingException ( "The mandatory 'maxConstraint' attribute is missing from element 'associationValididtyConstraint'." , $ element ) ; } } else { throw new UnmarshallingException ( "The mandatory 'minConstraint' attribute is missing from element 'associationValididtyConstraint'." , $ element ) ; } } else { throw new UnmarshallingException ( "The mandatory 'identifier' attribute is missing from element 'associationValididtyConstraint'." , $ element ) ; } }
Unmarshall a DOMElement to its AssociationValidityConstraint data model representation.

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