gluephp/glue-twig
Composer 安装命令:
composer require gluephp/glue-twig
包简介
Use twig templating engine in Glue
README 文档
README
Use twig/twig with gluephp/glue
Installation
Use Composer:
$ composer require gluephp/glue-twig
Configure Twig
$app = new Glue\App; $app->config->override([ 'twig' => [ 'path' => '/absolute/path/to/templates/folder', 'config' => [ // Additional Twig config, read Twigs // documentation for more info... ] ], ]);
Register Twig
$app->register( new Glue\Twig\ServiceProvider() );
Get the Twig instance
Once the service provider is registered, you can fetch the Twig instance with:
$twig = $app->make('Twig_Environment');
or use the alias:
$twig = $app->twig;
统计信息
- 总下载量: 18
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2016-05-06