Is it possible to buffer the output of $app->run from silex? -


i wondering if possible store output created silex. want achieve :

<?php     require('core.php');     $out = $app->run();     echo $app['twig']->render('header.html');     echo $out;     echo $app['twig']->render('footer.html'); 

i'd way because of navigation build inside dynamic controllers , registered global twig. i've tried use out buffering ob_start mechanism without succes :

<?php     require('core.php');     ob_start();     $app->run();     $out = ob_get_contents();     ob_end_clean();     echo $app['twig']->render('header.html');     echo $out;     echo $app['twig']->render('footer.html'); 

any other ideas on subject ?

instead of having split of header/main/footer , using global variables, should use unique template template inheritence.

http://twig.sensiolabs.org/doc/templates.html#template-inheritance


Comments

Popular posts from this blog

php - Calling a template part from a post -

Firefox SVG shape not printing when it has stroke -

How to mention the localhost in android -