protected function unmarshall(DOMElement $element)
    {
        $objectElts = $this->getChildElementsByTagName($element, 'object');
        if (count($objectElts) > 0) {

            $object = $this->getMarshallerFactory()->createMarshaller($objectElts[0])->unmarshall($objectElts[0]);

            $positionObjectInteractionElts = $this->getChildElementsByTagName($element, 'positionObjectInteraction');
            if (count($positionObjectInteractionElts) > 0) {

                $positionObjectInteractions = new PositionObjectInteractionCollection();

                foreach ($positionObjectInteractionElts as $interactionElt) {
                    $positionObjectInteractions[] = $this->getMarshallerFactory()->createMarshaller($interactionElt)->unmarshall($interactionElt);
                }

                return new PositionObjectStage($object, $positionObjectInteractions);
            } else {
                $msg = "A 'positionObjectStage' element must contain at least one 'positionObjectInteraction' element, none given.";
                throw new UnmarshallingException($msg, $element);
            }
        } else {
            $msg = "A 'positionObjectStage' element must contain exactly one 'object' element, none given.";
            throw new UnmarshallingException($msg, $element);
        }
    }
protected function unmarshall(DOMElement $element)
    {
        $objectElts = $this->getChildElementsByTagName($element, 'object');
        if (count($objectElts) > 0) {

            $object = $this->getMarshallerFactory()->createMarshaller($objectElts[0])->unmarshall($objectElts[0]);

            $positionObjectInteractionElts = $this->getChildElementsByTagName($element, 'positionObjectInteraction');
            if (count($positionObjectInteractionElts) > 0) {

                $positionObjectInteractions = new PositionObjectInteractionCollection();

                foreach ($positionObjectInteractionElts as $interactionElt) {
                    $positionObjectInteractions[] = $this->getMarshallerFactory()->createMarshaller($interactionElt)->unmarshall($interactionElt);
                }

                return new PositionObjectStage($object, $positionObjectInteractions);
            } else {
                $msg = "A 'positionObjectStage' element must contain at least one 'positionObjectInteraction' element, none given.";
                throw new UnmarshallingException($msg, $element);
            }
        } else {
            $msg = "A 'positionObjectStage' element must contain exactly one 'object' element, none given.";
            throw new UnmarshallingException($msg, $element);
        }
    }
protected function unmarshall ( DOMElement $ element ) { $ objectElts = $ this -> getChildElementsByTagName ( $ element , 'object' ) ; if ( count ( $ objectElts ) > 0 ) { $ object = $ this -> getMarshallerFactory ( ) -> createMarshaller ( $ objectElts [ 0 ] ) -> unmarshall ( $ objectElts [ 0 ] ) ; $ positionObjectInteractionElts = $ this -> getChildElementsByTagName ( $ element , 'positionObjectInteraction' ) ; if ( count ( $ positionObjectInteractionElts ) > 0 ) { $ positionObjectInteractions = new PositionObjectInteractionCollection ( ) ; foreach ( $ positionObjectInteractionElts as $ interactionElt ) { $ positionObjectInteractions [ ] = $ this -> getMarshallerFactory ( ) -> createMarshaller ( $ interactionElt ) -> unmarshall ( $ interactionElt ) ; } return new PositionObjectStage ( $ object , $ positionObjectInteractions ) ; } else { $ msg = "A 'positionObjectStage' element must contain at least one 'positionObjectInteraction' element, none given." ; throw new UnmarshallingException ( $ msg , $ element ) ; } } else { $ msg = "A 'positionObjectStage' element must contain exactly one 'object' element, none given." ; throw new UnmarshallingException ( $ msg , $ element ) ; } }
Unmarshall a DOMElement object corresponding to an positionObjectStage element.

@param \DOMElement $element A DOMElement object.
@return \qtism\data\QtiComponent A PositionObjectStage object.
@throws \qtism\data\storage\xml\marshalling\UnmarshallingException
Unmarshall a DOMElement object corresponding to an positionObjectStage element .