📜  twig 渲染字符串 - 任何代码示例

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

代码示例2
$twig = clone $this->get('twig');
$twig->setLoader(new \Twig_Loader_String());
$rendered = $twig->render(
  "Test string template: {{ result|humanize }}",
  array("result" => "mega_success")
);