Download the PHP package yangweijie/think-stempler without Composer
On this page you can find all versions of the php package yangweijie/think-stempler. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Please rate this library. Is it a good library?
Informations about the package think-stempler
Think-Stempler 模板引擎
基于 Spiral Stempler 核心功能的 ThinkPHP 模板引擎扩展,提供现代化的模板特性。
🚀 特性
✅ 完全实现的功能
- 基本语法: 变量输出、转义控制、注释
- 指令系统: 条件、循环、判断、工具指令
- 布局继承: 完整的模板继承系统
- 栈系统: 强大的内容栈管理
- 组件系统: 可复用的 UI 组件
- ThinkPHP 集成: 完全兼容 ThinkPHP 框架
🎯 性能表现
- 渲染速度: 平均 1-2ms
- 内存使用: 优化的临时文件执行
- 安全性: 移除 eval,使用安全的文件执行
- 缓存机制: 智能的编译缓存
📦 安装
🔧 配置
在 ThinkPHP 配置文件中添加:
📖 基本语法
变量输出
条件指令
循环指令
选择指令
工具指令
🏗️ 布局继承
定义布局
继承布局
📚 栈系统
栈系统允许你在模板的任何地方推送内容,然后在指定位置收集和渲染。
收集栈内容
推送到栈
渲染顺序
<stack:prepend>
: 添加到栈顶(最先渲染)- 默认内容: 中间渲染
<stack:push>
: 添加到栈底(最后渲染)
🧩 组件系统
内置组件
Alert 组件
Card 组件
Button 组件
Input 组件
Modal 组件
Table 组件
自定义组件
你可以注册自定义组件:
🎮 控制器使用
基本使用
使用布局
🔧 高级配置
组件路径
功能开关
🚀 性能优化
启用缓存
生产环境优化
🐛 调试
启用调试模式
查看编译后的代码
📝 更新日志
v2.0.0 (2024-06-26)
- 🎉 完全重构,基于 Spiral Stempler 设计理念
- ✨ 新增布局继承系统
- ✨ 新增栈系统
- ✨ 新增组件系统
- 🚀 性能大幅提升
- 🔒 安全性增强
- 📚 完善的文档
📄 许可证
MIT License
🤝 贡献
欢迎提交 Issue 和 Pull Request!
📞 支持
如有问题,请提交 Issue 或联系维护者。
All versions of think-stempler with dependencies
PHP Build Version
Package Version
The package yangweijie/think-stempler contains the following files
Loading the files please wait ....