template-interop / plates-adapter
为template-interop/engine提供的League Plates适配器
0.0.2
2019-09-17 16:03 UTC
Requires
- php: >=7.1
- league/plates: ^3.3
- template-interop/engine: ^0.0.2
Requires (Dev)
- phpunit/phpunit: ^8.3
This package is auto-updated.
Last update: 2024-08-29 05:23:14 UTC
README
league/plates适配器,用于template-interop/engine。
安装
此软件包可以通过Composer安装和自动加载。
$ composer require template-interop/plates-adapter
使用方法
<?php use Interop\Template\Plates\PlatesEngine; $plates = new League\Plates\Engine(__DIR__.'/templates'); $engine = new PlatesEngine($plates); echo $engine->render('greeting', ['name' => 'John']);
您还可以结合使用template-interop/middleware,在HTTP中间件堆栈应用程序中使用它。