protected function unmarshall(DOMElement $element)
    {
        $component = new Colgroup();

        if (($span = $this->getDOMElementAttributeAs($element, 'span', 'integer')) !== null) {
            $component->setSpan($span);
        }

        $cols = new ColCollection();
        foreach ($this->getChildElementsByTagName($element, 'col') as $colElt) {
            $marshaller = $this->getMarshallerFactory()->createMarshaller($colElt);
            $cols[] = $marshaller->unmarshall($colElt);
        }
        $component->setContent($cols);

        $this->fillBodyElement($component, $element);

        return $component;
    }
protected function unmarshall(DOMElement $element)
    {
        $component = new Colgroup();

        if (($span = $this->getDOMElementAttributeAs($element, 'span', 'integer')) !== null) {
            $component->setSpan($span);
        }

        $cols = new ColCollection();
        foreach ($this->getChildElementsByTagName($element, 'col') as $colElt) {
            $marshaller = $this->getMarshallerFactory()->createMarshaller($colElt);
            $cols[] = $marshaller->unmarshall($colElt);
        }
        $component->setContent($cols);

        $this->fillBodyElement($component, $element);

        return $component;
    }
protected function unmarshall ( DOMElement $ element ) { $ component = new Colgroup ( ) ; if ( ( $ span = $ this -> getDOMElementAttributeAs ( $ element , 'span' , 'integer' ) ) !== null ) { $ component -> setSpan ( $ span ) ; } $ cols = new ColCollection ( ) ; foreach ( $ this -> getChildElementsByTagName ( $ element , 'col' ) as $ colElt ) { $ marshaller = $ this -> getMarshallerFactory ( ) -> createMarshaller ( $ colElt ) ; $ cols [ ] = $ marshaller -> unmarshall ( $ colElt ) ; } $ component -> setContent ( $ cols ) ; $ this -> fillBodyElement ( $ component , $ element ) ; return $ component ; }
Unmarshall a DOMElement object corresponding to an XHTML colgroup table element.

@param \DOMElement $element A DOMElement object.
@return \qtism\data\QtiComponent A Colgroup object.
@throws \qtism\data\storage\xml\marshalling\UnmarshallingException
Unmarshall a DOMElement object corresponding to an XHTML colgroup table element .