dev-master
9999999-dev http://github.com/RobLoach/templating-smartySymfony Templating Component support for Smarty.
MIT
The Requires
- php >=5.3.0
- smarty/smarty ~3.1.21
- symfony/templating ~2.6.0@beta
The Development Requires
Symfony Templating Component support for Smarty.
Smarty support for Symfony's Templating component., (*2)
Templating Smarty can be installed with Composer by adding it as a dependency to your project's composer.json file., (*3)
{ "require": { "robloach/templating-smarty": "*" } }
Please refer to Composer's documentation for more detailed installation and usage instructions., (*4)
Instantiate the engine:, (*5)
``` php use RobLoach\TemplatingExtras\SmartyEngine;, (*6)
$parser = new Symfony\Component\Templating\TemplateNameParser(); $templating = new SmartyEngine($parser, array( 'template_dir' => '.' ));, (*7)
echo $templating->render('hello.smarty', array('firstname' => 'Fabien'));, (*8)
#### hello.smarty ``` smarty Hello, {$firstname}!
See Symfony's documentation on Templating for more information about using the different template engines available., (*9)
Symfony Templating Component support for Smarty.
MIT