exertis/yii2-handlebars 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

exertis/yii2-handlebars

Composer 安装命令:

composer require exertis/yii2-handlebars

包简介

The Handlebars.php integration for the Yii framework. Fork of https://github.com/7coders/yii2-handlebars which disappeared mysteriously from GitHub.

README 文档

README

Fork of https://github.com/7coders/yii2-handlebars which disappeared mysteriously from GitHub

From the original 7coders README.md

Handlebars renderer for Yii2 framework.

This extension provides a ViewRender that would allow you to use handlebars-php view template engine.

To use this extension, simply add the following code in your application configuration:

return [
    //....
    'components' => [
        'view' => [
            'renderers' => [
                'handlebars' => [
                    'class' => 'exertis\handlebars\ViewRenderer',
                    // the file extension of Handlebars templates
                    // 'extension' => '.handlebars',
                    // path alias pointing to where Handlebars cache will be stored. Set to false to disable templates cache.
                    // 'cache' => '@app/runtime/handlebars',
                    // array helpers to preload, can contain class names (strings).
                    // If empty - only default helpers will be preloaded
                    // 'helpers' => [],
                    // a callable function to escape values
                    // 'escape' => 'htmlspecialchars',
                    // array to pass as extra parameter to the escape function
                    // 'escapeArgs' => [ENT_COMPAT, 'UTF-8']
                ],
            ],
        ],
    ],
];

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist exertis/yii2-handlebars "*"  

or add

"exertis/yii2-handlebars": "*"  

to the require section of your composer.json.

统计信息

  • 总下载量: 111
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 2
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 2
  • Watchers: 3
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: BSD-3-Clause
  • 更新时间: 2015-01-30