📜  twig 渲染到变量 - PHP 代码示例

📅  最后修改于: 2022-03-11 14:54:50.747000             🧑  作者: Mango

代码示例1
// Instead of
$view->render($response, 'template.twig', []);
// Use
$content = $view->fetch('template.twig', []);
// It will not be added to a response, 
// just saved as a string in the variable!