PHPackages                             sy-records/think-template - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Templating &amp; Views](/categories/templating)
4. /
5. sy-records/think-template

ActiveLibrary[Templating &amp; Views](/categories/templating)

sy-records/think-template
=========================

use think template engine for hyperf.

v2.0.11(3y ago)12.0M↓18%12Apache-2.0PHPPHP &gt;=7.1.0

Since Nov 1Pushed 3y ago1 watchersCompare

[ Source](https://github.com/sy-records/think-template)[ Packagist](https://packagist.org/packages/sy-records/think-template)[ Fund](https://donate.qq52o.me)[ RSS](/packages/sy-records-think-template/feed)WikiDiscussions 2.0 Synced 1mo ago

READMEChangelog (3)Dependencies (1)Versions (16)Used By (2)

ThinkTemplate
=============

[](#thinktemplate)

基于XML和标签库的编译型模板引擎，在Hyperf中使用ThinkTemplate

安装
--

[](#安装)

```
composer require sy-records/think-template
```

主要特性
----

[](#主要特性)

- 支持XML标签库和普通标签的混合定义；
- 支持直接使用PHP代码书写；
- 支持文件包含；
- 支持多级标签嵌套；
- 支持布局模板功能；
- 一次编译多次运行，编译和运行效率非常高；
- 模板文件和布局模板更新，自动更新模板缓存；
- 系统变量无需赋值直接输出；
- 支持多维数组的快速输出；
- 支持模板变量的默认值；
- 支持页面代码去除Html空白；
- 支持变量组合调节器和格式化功能；
- 允许定义模板禁用函数和禁用PHP语法；
- 通过标签库方式扩展；

用法示例
----

[](#用法示例)

```
