phptransformers / text-template
PHPUnit's Text_Template implementation of PhpTransformer.
1.0.0
2016-02-28 21:29 UTC
Requires
- phptransformers/phptransformer: ~1.0.0
- phpunit/php-text-template: ^1.2
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-17 00:04:13 UTC
README
PHPUnit's Text_Template support for PHPTransformers.
Install
Via Composer
$ composer require phptransformers/text-template
Usage
$engine = new TextTemplateTransformer(); echo $engine->render('Hello, {name}!', array('name' => 'phptransformers'));
Options
$engine = new TextTemplateTransformer(array( 'open-delimiter' => '{', // Default to '{' (Text_Template default) 'close-delimiter' => '}' // Default to '}' (Text_Template default) )); // ... $textTemplate = new \Text_Template(); $engine = new TextTemplateTransformer(array( 'text-template' => $textTemplate // All others options are ignored ));
Testing
$ composer test
License
The MIT License (MIT). Please see License File for more information.