quellabs/canvas-smarty
最新稳定版本:1.0.26
Composer 安装命令:
composer require quellabs/canvas-smarty
包简介
Smarty template engine integration for the Canvas PHP framework with contextual containers and automatic service discovery
README 文档
README
A Smarty template engine integration for the Canvas PHP framework.
Installation
composer require quellabs/canvas-smarty
Requirements
- PHP 8.3 or higher
- Canvas framework
Usage
The Smarty template engine is automatically registered with Canvas through the service discovery system. No manual configuration required.
// In your Canvas controller class HomeController { public function index(TemplateEngineInterface $smarty) { return $smarty->render('home.tpl', [ 'title' => 'Welcome to Canvas', 'user' => $user ]); } }
Template Files
Place your Smarty templates in your Canvas application's template directory:
templates/
├── home.tpl
├── layouts/
│ └── app.tpl
└── partials/
└── header.tpl
License
MIT License
统计信息
- 总下载量: 49
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 2
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-05-26