protected function unmarshall(DOMElement $element)
    {
        $interpolationTableEntryElements = $element->getElementsByTagName('interpolationTableEntry');

        if ($interpolationTableEntryElements->length > 0) {
            $interpolationTableEntryCollection = new InterpolationTableEntryCollection();
            for ($i = 0; $i < $interpolationTableEntryElements->length; $i++) {
                $marshaller = $this->getMarshallerFactory()->createMarshaller($interpolationTableEntryElements->item($i), array($this->getBaseType()));
                $interpolationTableEntryCollection[] = $marshaller->unmarshall($interpolationTableEntryElements->item($i));
            }

            $object = new InterpolationTable($interpolationTableEntryCollection);

            if (($defaultValue = $this->getDOMElementAttributeAs($element, 'defaultValue')) !== null) {
                try {
                    $object->setDefaultValue(Utils::stringToDatatype($defaultValue, $this->getBaseType()));
                } catch (\UnexpectedValueException $e) {
                    $msg = "Unable to transform '${defaultValue}' into float.";
                    throw new UnmarshallingException($msg, $element, $e);
                }
            }

            return $object;
        } else {
            $msg = "An 'interpolationTable' element must contain at least one 'interpolationTableEntry' element.";
            throw new UnmarshallingException($msg, $element);
        }
    }
protected function unmarshall(DOMElement $element)
    {
        $interpolationTableEntryElements = $element->getElementsByTagName('interpolationTableEntry');

        if ($interpolationTableEntryElements->length > 0) {
            $interpolationTableEntryCollection = new InterpolationTableEntryCollection();
            for ($i = 0; $i < $interpolationTableEntryElements->length; $i++) {
                $marshaller = $this->getMarshallerFactory()->createMarshaller($interpolationTableEntryElements->item($i), array($this->getBaseType()));
                $interpolationTableEntryCollection[] = $marshaller->unmarshall($interpolationTableEntryElements->item($i));
            }

            $object = new InterpolationTable($interpolationTableEntryCollection);

            if (($defaultValue = $this->getDOMElementAttributeAs($element, 'defaultValue')) !== null) {
                try {
                    $object->setDefaultValue(Utils::stringToDatatype($defaultValue, $this->getBaseType()));
                } catch (\UnexpectedValueException $e) {
                    $msg = "Unable to transform '${defaultValue}' into float.";
                    throw new UnmarshallingException($msg, $element, $e);
                }
            }

            return $object;
        } else {
            $msg = "An 'interpolationTable' element must contain at least one 'interpolationTableEntry' element.";
            throw new UnmarshallingException($msg, $element);
        }
    }
protected function unmarshall ( DOMElement $ element ) { $ interpolationTableEntryElements = $ element -> getElementsByTagName ( 'interpolationTableEntry' ) ; if ( $ interpolationTableEntryElements -> length > 0 ) { $ interpolationTableEntryCollection = new InterpolationTableEntryCollection ( ) ; for ( $ i = 0 ; $ i < $ interpolationTableEntryElements -> length ; $ i ++ ) { $ marshaller = $ this -> getMarshallerFactory ( ) -> createMarshaller ( $ interpolationTableEntryElements -> item ( $ i ) , array ( $ this -> getBaseType ( ) ) ) ; $ interpolationTableEntryCollection [ ] = $ marshaller -> unmarshall ( $ interpolationTableEntryElements -> item ( $ i ) ) ; } $ object = new InterpolationTable ( $ interpolationTableEntryCollection ) ; if ( ( $ defaultValue = $ this -> getDOMElementAttributeAs ( $ element , 'defaultValue' ) ) !== null ) { try { $ object -> setDefaultValue ( Utils :: stringToDatatype ( $ defaultValue , $ this -> getBaseType ( ) ) ) ; } catch ( \ UnexpectedValueException $ e ) { $ msg = "Unable to transform '${defaultValue}' into float." ; throw new UnmarshallingException ( $ msg , $ element , $ e ) ; } } return $ object ; } else { $ msg = "An 'interpolationTable' element must contain at least one 'interpolationTableEntry' element." ; throw new UnmarshallingException ( $ msg , $ element ) ; } }
Unmarshall a DOMElement object corresponding to a QTI InterpolationTable element.

@param \DOMElement $element A DOMElement object.
@return \qtism\data\QtiComponent An InterpolationTable object.
@throws \qtism\data\storage\xml\marshalling\UnmarshallingException If $element does not contain any interpolationTableEntry QTI elements.
Unmarshall a DOMElement object corresponding to a QTI InterpolationTable element .