Core/Core/Controller.php
protected function render($view, array $data = [])
    {
        // Extract variables.
        extract($data);

        // Start buffering.
        ob_start();

        // Load view file (root location is declared in viewPath var).
        include $this->container->get('config')['viewsPath'] . '/' . $view . '.php';

        // Get buffered content
        $body = ob_get_contents();
        ob_end_clean();

        // Make response and add body to it
        $response = new Response();
        $response->writeBody($body);
        return $response;
    }
protected function render($view, array $data = [])
    {
        // Extract variables.
        extract($data);

        // Start buffering.
        ob_start();

        // Load view file (root location is declared in viewPath var).
        include $this->container->get('config')['viewsPath'] . '/' . $view . '.php';

        // Get buffered content
        $body = ob_get_contents();
        ob_end_clean();

        // Make response and add body to it
        $response = new Response();
        $response->writeBody($body);
        return $response;
    }
protected function render ( $ view , array $ data = [ ] ) { // Extract variables. extract ( $ data ) ; // Start buffering. ob_start ( ) ; // Load view file (root location is declared in viewPath var). include $ this -> container -> get ( 'config' ) [ 'viewsPath' ] . '/' . $ view . '.php' ; // Get buffered content $ body = ob_get_contents ( ) ; ob_end_clean ( ) ; // Make response and add body to it $ response = new Response ( ) ; $ response -> writeBody ( $ body ) ; return $ response ; }
Render output for display.

@param string $view
@param array $data
@return ResponseInterface
Render output for display .