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

        // Start buffering.
        ob_start();

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

        // Return string.       
        $buffer = ob_get_contents();
        ob_end_clean();
        return $buffer;
    }
protected function buffer($view, array $data = [])
    {
        // Extract variables.
        extract($data);

        // Start buffering.
        ob_start();

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

        // Return string.       
        $buffer = ob_get_contents();
        ob_end_clean();
        return $buffer;
    }
protected function buffer ( $ view , array $ data = [ ] ) { // Extract variables. extract ( $ data ) ; // Start buffering. ob_start ( ) ; // Load view file (root location is declared in viewsPath var). include $ this -> container -> get ( 'config' ) [ 'viewsPath' ] . '/' . $ view . '.php' ; // Return string.        $ buffer = ob_get_contents ( ) ; ob_end_clean ( ) ; return $ buffer ; }
Buffer output and return it as string.

@param string $view
@param array $data
@return string
Buffer output and return it as string .