Dwoo 实现的 PhpTransformer

1.0.0 2017-10-01 13:07 UTC

This package is auto-updated.

Last update: 2024-09-16 23:20:20 UTC


README

Dwoo 支持 PHPTransformers.

安装

通过 Composer

$ composer require phptransformers/dwoo

用法

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

选项

$engine = new DwooTransformer(array(
    'cache-dir' => 'path/to/the/cache', // Default to the system temporary directory
    'compile-dir' => 'path/to/the/compile/dir', // Default to the system temporary directory
    'template-dir' => 'path/to/the/templates' // By default search for absolute path
));

// ...

$core = new \Dwoo\Core();
$engine = new DwooTransformer(array(
    'dwoo' => $core // All others options are ignored
));

测试

$ composer test

许可协议

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