template-interop/latte-adapter

Latte adapter for template-interop/engine

0.0.1 2019-09-16 13:50 UTC

This package is auto-updated.

Last update: 2024-04-20 23:42:33 UTC


README

latte/latte adapter for template-interop/engine.

Installation

This package is installable and autoloadable via Composer.

$ composer require template-interop/latte-adapter

Usage

<?php

use Interop\Template\Latte\LatteEngine;

$latte = new Latte\Engine;
$latte->setLoader(new Latte\Loaders\FileLoader(__DIR__.'/templates'));
$engine = new LatteEngine($latte);
echo $engine->render('greeting', ['name' => 'John']);

You can also use it in conjunction with template-interop/middleware to use it in a HTTP middleware stack application.