phptransformers / phptal
PHPTAL implementation of PhpTransformer.
1.0.0
2016-02-28 15:12 UTC
Requires
- php: >=5.3.0
- phptal/phptal: ^1.3
- phptransformers/phptransformer: ~1.0.0
Requires (Dev)
- phpmd/phpmd: ^2.3
- phpunit/phpunit: ~4.6
- sebastian/phpcpd: ^2.0
- squizlabs/php_codesniffer: ~2.3
This package is auto-updated.
Last update: 2024-10-16 23:12:23 UTC
README
PHPTAL support for PHPTransformers.
Install
Via Composer
$ composer require phptransformers/phptal
Usage
$engine = new PHPTALTransformer(); echo $engine->render('<tal:block>Hello, ${name}!</tal:block>', array('name' => 'phptransformers'));
Options
$engine = new PHPTALTransformer(array( 'cache-dir' => 'path/to/cache/directory', // Default to the system temporary directory 'template-dir' => 'path/to/template/directory' // default to $PWD )); // ... $phptal = new \PHPTAL(); $engine = new PHPTALTransformer(array( 'phptal' => $phptal // All others options are ignored ));
Testing
$ composer test
License
The MIT License (MIT). Please see License File for more information.