bloge/ twig-renderer
此包的最新版本(dev-master)没有可用的许可信息。
Bloge的Twig渲染器适配器
dev-master
2015-12-02 16:32 UTC
Requires
- bloge/bloge: dev-master
- twig/twig: ^1.23
This package is not auto-updated.
Last update: 2024-09-14 18:47:36 UTC
README
Twig – PHP的类似Smarty的模板引擎编译器。Twig渲染器是Twig在Bloge中的适配器。
文档
Bloge渲染器\Bloge\Renderers\Twig需要一个参数绝对路径$path,其中包含模板位置,第二个可选参数$options是一个数组,用于指定传递给Twig的额外选项。
示例
use Bloge\Renderers\Twig; $renderer = new Twig(__DIR__ . '/theme', [ 'cache' => __DIR__ . '/cache' ]);
然后您可以将此渲染器插入基本或高级应用程序
use Bloge\Apps\BasicApp; // ... return new BasicApp($content, $renderer);