Skip to content

phptransformers/plates

Repository files navigation

Plates for PHPTransformers

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.