public function marshall(QtiComponent $component)
    {
        $element = self::getDOMCradle()->createElement('responseValidityConstraint');
        $this->setDOMElementAttribute($element, 'responseIdentifier', $component->getResponseIdentifier());
        $this->setDOMElementAttribute($element, 'minConstraint', $component->getMinConstraint());
        $this->setDOMElementAttribute($element, 'maxConstraint', $component->getMaxConstraint());
        
        if (($patternMask = $component->getPatternMask()) !== '') {
            $this->setDOMElementAttribute($element, 'patternMask', $patternMask);
        }
        
        foreach ($component->getAssociationValidityConstraints() as $associationValidityConstraint) {
            $marshaller = $this->getMarshallerFactory()->createMarshaller($associationValidityConstraint);
            $element->appendChild($marshaller->marshall($associationValidityConstraint));
        }

        return $element;
    }
public function marshall(QtiComponent $component)
    {
        $element = self::getDOMCradle()->createElement('responseValidityConstraint');
        $this->setDOMElementAttribute($element, 'responseIdentifier', $component->getResponseIdentifier());
        $this->setDOMElementAttribute($element, 'minConstraint', $component->getMinConstraint());
        $this->setDOMElementAttribute($element, 'maxConstraint', $component->getMaxConstraint());
        
        if (($patternMask = $component->getPatternMask()) !== '') {
            $this->setDOMElementAttribute($element, 'patternMask', $patternMask);
        }
        
        foreach ($component->getAssociationValidityConstraints() as $associationValidityConstraint) {
            $marshaller = $this->getMarshallerFactory()->createMarshaller($associationValidityConstraint);
            $element->appendChild($marshaller->marshall($associationValidityConstraint));
        }

        return $element;
    }
public function marshall ( QtiComponent $ component ) { $ element = self :: getDOMCradle ( ) -> createElement ( 'responseValidityConstraint' ) ; $ this -> setDOMElementAttribute ( $ element , 'responseIdentifier' , $ component -> getResponseIdentifier ( ) ) ; $ this -> setDOMElementAttribute ( $ element , 'minConstraint' , $ component -> getMinConstraint ( ) ) ; $ this -> setDOMElementAttribute ( $ element , 'maxConstraint' , $ component -> getMaxConstraint ( ) ) ; if ( ( $ patternMask = $ component -> getPatternMask ( ) ) !== '' ) { $ this -> setDOMElementAttribute ( $ element , 'patternMask' , $ patternMask ) ; } foreach ( $ component -> getAssociationValidityConstraints ( ) as $ associationValidityConstraint ) { $ marshaller = $ this -> getMarshallerFactory ( ) -> createMarshaller ( $ associationValidityConstraint ) ; $ element -> appendChild ( $ marshaller -> marshall ( $ associationValidityConstraint ) ) ; } return $ element ; }
Marshall a ResponseValidityConstraint object to its XML counterpart.

@param \qtism\data\QtiComponent $component
@return \DOMElement
Marshall a ResponseValidityConstraint object to its XML counterpart .