PHPTAL implementation of PhpTransformer.

1.0.0 2016-02-28 15:12 UTC

This package is auto-updated.

Last update: 2024-11-16 23:23: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.