Plates implementation of PhpTransformer

1.0.1 2017-10-05 18:37 UTC

This package is auto-updated.

Last update: 2024-12-17 00:12:07 UTC


README

Plates support for PHPTransformers.

Install

Via Composer

$ composer require phptransformers/plates

Usage

$engine = new PlatesTransformer();
echo $engine->render('Hello, {$name}!', array('name' => 'phptransformers'));

Options

$engine = new PlatesTransformer(array(
    'directory' => 'path/to/the/templates', // Default to the current working directory
    'extension' => 'plates' // Extensions of templates files (default to no extention filtering)
));

// ...

$plates = new \League\Plates\Engine();
$engine = new PlatesTransformer(array(
    'plates' => $plates // All others options are ignored
));

Testing

$ composer test

License

The MIT License (MIT). Please see License File for more information.