public function render($component, $base = '')
    {
        $renderingEngine = $this->getRenderingEngine();
        $doc = $renderingEngine->getDocument();
        $fragment = $doc->createDocumentFragment();

        // Apply rendering...
        $this->renderingImplementation($fragment, $component, $base);

        // Specific case for stylesheet elements...
        if ($component instanceof Stylesheet && $renderingEngine->getStylesheetPolicy() === AbstractMarkupRenderingEngine::STYLESHEET_SEPARATE) {
            // Stylesheet must be rendered separately.
            $stylesheets = $renderingEngine->getStylesheets();
            $stylesheets->appendChild($fragment);
        } else {
            // Stylesheet must be rendered at the same place.
            $renderingEngine->storeRendering($component, $fragment);
        }

        return $fragment;
    }
public function render($component, $base = '')
    {
        $renderingEngine = $this->getRenderingEngine();
        $doc = $renderingEngine->getDocument();
        $fragment = $doc->createDocumentFragment();

        // Apply rendering...
        $this->renderingImplementation($fragment, $component, $base);

        // Specific case for stylesheet elements...
        if ($component instanceof Stylesheet && $renderingEngine->getStylesheetPolicy() === AbstractMarkupRenderingEngine::STYLESHEET_SEPARATE) {
            // Stylesheet must be rendered separately.
            $stylesheets = $renderingEngine->getStylesheets();
            $stylesheets->appendChild($fragment);
        } else {
            // Stylesheet must be rendered at the same place.
            $renderingEngine->storeRendering($component, $fragment);
        }

        return $fragment;
    }
public function render ( $ component , $ base = '' ) { $ renderingEngine = $ this -> getRenderingEngine ( ) ; $ doc = $ renderingEngine -> getDocument ( ) ; $ fragment = $ doc -> createDocumentFragment ( ) ; // Apply rendering... $ this -> renderingImplementation ( $ fragment , $ component , $ base ) ; // Specific case for stylesheet elements... if ( $ component instanceof Stylesheet && $ renderingEngine -> getStylesheetPolicy ( ) === AbstractMarkupRenderingEngine :: STYLESHEET_SEPARATE ) { // Stylesheet must be rendered separately. $ stylesheets = $ renderingEngine -> getStylesheets ( ) ; $ stylesheets -> appendChild ( $ fragment ) ; } else { // Stylesheet must be rendered at the same place. $ renderingEngine -> storeRendering ( $ component , $ fragment ) ; } return $ fragment ; }
Render a QtiComponent into a DOMDocumentFragment that will be registered
in the current rendering context.

@return \DOMDocumentFragment A DOMDocumentFragment object containing the rendered $component into another constitution with its children rendering appended.
@throws \qtism\runtime\rendering\RenderingException If an error occurs while rendering $component.
Render a QtiComponent into a DOMDocumentFragment that will be registered in the current rendering context .