schranz-templating / mezzio-mustache-integration
通过Mustache模板引擎将模板渲染器集成到mezzio。
0.1.0
2022-11-06 17:02 UTC
Requires
- php: ^7.0 || ^8.0
- psr/container: ^1.0 || ^2.0
- schranz-templating/mustache-adapter: ^0.1
README
将Mustache适配器集成到Mezzio框架中。
是Schranz模板项目的一部分。
安装
使用Composer安装此包
composer require schranz-templating/mezzio-mustache-integration
如果你的config/config.php
中还没有自动添加,请注册ConfigProvider类
// ... $aggregator = new ConfigAggregator([ // ... \Schranz\Templating\Integration\Mezzio\Mustache\ConfigProvider::class, ]);
配置
以下配置可用
// src/App/src/ConfigProvider.php class ConfigProvider { public function __invoke(): array { return [ // ... 'mustache' => [ 'path' => 'src/App/templates', 'cache_dir' => 'data/cache/mustache', ], ]; } }