template-interop / smarty-adapter
Smarty adapter for template-interop/engine
0.0.1
2019-09-16 16:15 UTC
Requires
- php: >=7.1
- smarty/smarty: ^3.1
- template-interop/engine: ^0.0.2
Requires (Dev)
- phpunit/phpunit: ^8.3
This package is auto-updated.
Last update: 2024-11-17 03:46:43 UTC
README
smarty/smarty adapter for template-interop/engine.
Installation
This package is installable and autoloadable via Composer.
$ composer require template-interop/smarty-adapter
Usage
<?php use Interop\Template\Smarty\SmartyEngine; $smarty = new Smarty; $smarty->setTemplateDir(__DIR__.'/templates'); $engine = new SmartyEngine($smarty); 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.