定制 codemix/handlebarsphp 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

codemix/handlebarsphp

Composer 安装命令:

composer require codemix/handlebarsphp

包简介

Transpiles handlebars templates into native PHP templates.

README 文档

README

Note: this is alpha quality software, use at your own risk.

Turns handlebars templates into executable PHP code ahead of time, ships with built in support for Yii 1.x. but allows customisation of output to support different frameworks.

Installation

Install via composer, package name is codemix/handlebarsphp.

Differences from HandlebarsJS

HandlebarsPHP aims to be compatible with a subset of HandlebarsJS. For performance reasons it compiles the templates ahead of time and this necessitates some restrictions.

  1. Since it's impossible to tell whether a tag like {{foo}} is a helper or a property at compile time, we assume that its a property. We differentiate helpers by looking for arguments, for example {{foo 1}} will be interpretted as a function call because it has an argument. This means that it is impossible to call a helper with zero arguments.

  2. {{@key}} and {{@index}} always point to the same variable, because foreach is used for all iteration.

统计信息

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

GitHub 信息

  • Stars: 6
  • Watchers: 0
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2013-07-02

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固