bobthecow/mustache-bundle
Composer 安装命令:
composer require bobthecow/mustache-bundle
包简介
Symfony Mustache.php Bundle
README 文档
README
A Symfony implementation of the Mustache template rendering. This will add Mustache as a renderer in Symfony
- Installing
Composer
Just run following command with composer:
composer.phar require bobthecow/mustache-bundle
Lookup desired version constraint from packagist. After adding this run
composer.phar update
AppKernel
To actually download and use this bundle. Also add following line to your AppKernel.php
new Bobthecow\Bundle\MustacheBundle\BobthecowMustacheBundle()
config.yml
Add rendererer to your config.yml
framework:
templating:
engines: ['twig', 'mustache']
- Using it
Like you would use twig. Just put your mustache file in your Resources\views folder using .mustache as extension.
E.g.
// Render Mustache template and return response
return $this->render('AcmeDemoBundle:Hello:index.html.mustache');
Or pass along the template in the Template() annotation
/**
* @Template("AcmeDemoBundle:Hello:index.html.mustache")
*/
public function indexAction()
{
return array();
}
统计信息
- 总下载量: 87.93k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 18
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2012-09-12