robloach/templating-smarty
Composer 安装命令:
composer require robloach/templating-smarty
包简介
Symfony Templating Component support for Smarty.
README 文档
README
Smarty support for Symfony's Templating component.
Installation
Templating Smarty can be installed with Composer by adding it as a dependency to your project's composer.json file.
{
"require": {
"robloach/templating-smarty": "*"
}
}
Please refer to Composer's documentation for more detailed installation and usage instructions.
Usage
Instantiate the engine:
use RobLoach\TemplatingExtras\SmartyEngine; $parser = new Symfony\Component\Templating\TemplateNameParser(); $templating = new SmartyEngine($parser, array( 'template_dir' => '.' )); echo $templating->render('hello.smarty', array('firstname' => 'Fabien'));
hello.smarty
Hello, {$firstname}!
See Symfony's documentation on Templating for more information about using the different template engines available.
统计信息
- 总下载量: 6
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2014-10-25