Skip to content

phptransformers/text-template

Repository files navigation

Text_Template for PHPTransformers

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.

About

Text_Template support for PHPTransformers.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages