protected function marshall(QtiComponent $component)
    {
        $element = static::getDOMCradle()->createElement($component->getQtiClassName());

        $this->setDOMElementAttribute($element, 'identifier', $component->getIdentifier());
        $this->setDOMElementAttribute($element, 'required', $component->isRequired());
        $this->setDOMElementAttribute($element, 'fixed', $component->isFixed());

        foreach ($component->getPreConditions() as $preCondition) {
            $marshaller = $this->getMarshallerFactory()->createMarshaller($preCondition);
            $element->appendChild($marshaller->marshall($preCondition));
        }

        foreach ($component->getBranchRules() as $branchRule) {
            $marshaller = $this->getMarshallerFactory()->createMarshaller($branchRule);
            $element->appendChild($marshaller->marshall($branchRule));
        }

        if ($component->getItemSessionControl() != null) {
            $marshaller = $this->getMarshallerFactory()->createMarshaller($component->getItemSessionControl());
            $element->appendChild($marshaller->marshall($component->getItemSessionControl()));
        }

        if ($component->getTimeLimits() != null) {
            $marshaller = $this->getMarshallerFactory()->createMarshaller($component->getTimeLimits());
            $element->appendChild($marshaller->marshall($component->getTimeLimits()));
        }

        return $element;
    }
protected function marshall(QtiComponent $component)
    {
        $element = static::getDOMCradle()->createElement($component->getQtiClassName());

        $this->setDOMElementAttribute($element, 'identifier', $component->getIdentifier());
        $this->setDOMElementAttribute($element, 'required', $component->isRequired());
        $this->setDOMElementAttribute($element, 'fixed', $component->isFixed());

        foreach ($component->getPreConditions() as $preCondition) {
            $marshaller = $this->getMarshallerFactory()->createMarshaller($preCondition);
            $element->appendChild($marshaller->marshall($preCondition));
        }

        foreach ($component->getBranchRules() as $branchRule) {
            $marshaller = $this->getMarshallerFactory()->createMarshaller($branchRule);
            $element->appendChild($marshaller->marshall($branchRule));
        }

        if ($component->getItemSessionControl() != null) {
            $marshaller = $this->getMarshallerFactory()->createMarshaller($component->getItemSessionControl());
            $element->appendChild($marshaller->marshall($component->getItemSessionControl()));
        }

        if ($component->getTimeLimits() != null) {
            $marshaller = $this->getMarshallerFactory()->createMarshaller($component->getTimeLimits());
            $element->appendChild($marshaller->marshall($component->getTimeLimits()));
        }

        return $element;
    }
protected function marshall ( QtiComponent $ component ) { $ element = static :: getDOMCradle ( ) -> createElement ( $ component -> getQtiClassName ( ) ) ; $ this -> setDOMElementAttribute ( $ element , 'identifier' , $ component -> getIdentifier ( ) ) ; $ this -> setDOMElementAttribute ( $ element , 'required' , $ component -> isRequired ( ) ) ; $ this -> setDOMElementAttribute ( $ element , 'fixed' , $ component -> isFixed ( ) ) ; foreach ( $ component -> getPreConditions ( ) as $ preCondition ) { $ marshaller = $ this -> getMarshallerFactory ( ) -> createMarshaller ( $ preCondition ) ; $ element -> appendChild ( $ marshaller -> marshall ( $ preCondition ) ) ; } foreach ( $ component -> getBranchRules ( ) as $ branchRule ) { $ marshaller = $ this -> getMarshallerFactory ( ) -> createMarshaller ( $ branchRule ) ; $ element -> appendChild ( $ marshaller -> marshall ( $ branchRule ) ) ; } if ( $ component -> getItemSessionControl ( ) != null ) { $ marshaller = $ this -> getMarshallerFactory ( ) -> createMarshaller ( $ component -> getItemSessionControl ( ) ) ; $ element -> appendChild ( $ marshaller -> marshall ( $ component -> getItemSessionControl ( ) ) ) ; } if ( $ component -> getTimeLimits ( ) != null ) { $ marshaller = $ this -> getMarshallerFactory ( ) -> createMarshaller ( $ component -> getTimeLimits ( ) ) ; $ element -> appendChild ( $ marshaller -> marshall ( $ component -> getTimeLimits ( ) ) ) ; } return $ element ; }
Marshall a SectionPart object into a DOMElement object.

@param \qtism\data\QtiComponent $component A SectionPart object.
@return \DOMElement The according DOMElement object.
Marshall a SectionPart object into a DOMElement object .