I am trying to excute the compiled volt files (The one converted to php).
Is there is a way to excute it and get the final html content
$eventsManager->attach('view:beforeRenderView', function($event, $view) use ($di, $cache) {
$voltDir = $view->getActiveRenderPath();
$cachedVolt = $cache->get($voltDir);
if(empty($cachedVolt)){
$compiler = new \Phalcon\Mvc\View\Engine\Volt\Compiler();
$name = md5($voltDir);
$compiledVolt = $compiler->compileFile($voltDir, '/path/to/compiled-volt/'.$name.'.php');
//What I should do to convert it from php to final html.
$view->setContent(/* Final HTML */);
}
});