protected function unmarshallChildrenKnown(DOMElement $element, QtiComponentCollection $children)
    {
        if (($figures = $this->getDOMElementAttributeAs($element, 'figures', 'string')) !== null) {

            if (!Format::isVariableRef($figures)) {
                $figures = intval($figures);
            }

            $object = new RoundTo($children, $figures);

            if (($roundingMode = $this->getDOMElementAttributeAs($element, 'roundingMode')) !== null) {
                $object->setRoundingMode(RoundingMode::getConstantByName($roundingMode));
            }

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

            if (!Format::isVariableRef($figures)) {
                $figures = intval($figures);
            }

            $object = new RoundTo($children, $figures);

            if (($roundingMode = $this->getDOMElementAttributeAs($element, 'roundingMode')) !== null) {
                $object->setRoundingMode(RoundingMode::getConstantByName($roundingMode));
            }

            return $object;
        } else {
            $msg = "The mandatory attribute 'figures' is missing from element '" . $element->localName . "'.";
            throw new UnmarshallingException($msg, $element);
        }
    }
protected function unmarshallChildrenKnown ( DOMElement $ element , QtiComponentCollection $ children ) { if ( ( $ figures = $ this -> getDOMElementAttributeAs ( $ element , 'figures' , 'string' ) ) !== null ) { if ( ! Format :: isVariableRef ( $ figures ) ) { $ figures = intval ( $ figures ) ; } $ object = new RoundTo ( $ children , $ figures ) ; if ( ( $ roundingMode = $ this -> getDOMElementAttributeAs ( $ element , 'roundingMode' ) ) !== null ) { $ object -> setRoundingMode ( RoundingMode :: getConstantByName ( $ roundingMode ) ) ; } return $ object ; } else { $ msg = "The mandatory attribute 'figures' is missing from element '" . $ element -> localName . "'." ; throw new UnmarshallingException ( $ msg , $ element ) ; } }
Unmarshall a QTI roundTo operator element into a RoundTo object.

@param \DOMElement $element The roundTo element to unmarshall.
@param \qtism\data\QtiComponentCollection $children A collection containing the child Expression objects composing the Operator.
@return \qtism\data\QtiComponent A RoundTo object.
@throws \qtism\data\storage\xml\marshalling\UnmarshallingException
Unmarshall a QTI roundTo operator element into a RoundTo object .