PhpTransformer 的 Plates 实现

1.0.1 2017-10-05 18:37 UTC

This package is auto-updated.

Last update: 2024-09-16 23:38:02 UTC


README

PlatesPHPTransformers 的支持。

安装

通过 Composer

$ composer require phptransformers/plates

使用

$engine = new PlatesTransformer();
echo $engine->render('Hello, {$name}!', array('name' => 'phptransformers'));

选项

$engine = new PlatesTransformer(array(
    'directory' => 'path/to/the/templates', // Default to the current working directory
    'extension' => 'plates' // Extensions of templates files (default to no extention filtering)
));

// ...

$plates = new \League\Plates\Engine();
$engine = new PlatesTransformer(array(
    'plates' => $plates // All others options are ignored
));

测试

$ composer test

许可证

MIT 许可证(MIT)。请参阅 许可证文件 以获取更多信息。