Library to wrap php template engines (currently only twig).
composer require innmind/templating
use Innmind\Templating\Factory;
use Innmind\Templating\Name;
use Innmind\Url\Path;
$render = Factory::build(
Path::of('templates/dir'),
Path::of('/tmp/cache'), // optional
Map::of(), // optional, variables accesible everywhere in templates
);
$rendered = $render(new Name('template.html.twig')); // Instance of Innmind\Filesystem\File\Content