Skip to content

phptransformers/phptal

Repository files navigation

PHPTAL for PHPTransformers

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.