luminar-organization/render-engine
Composer 安装命令:
composer require luminar-organization/render-engine
包简介
The render engine package for the Luminar PHP framework, supporting different templating engines.
README 文档
README
A custom render engine designed for the Luminar PHP Framework.
Features
- Basic Engine: Simple and effective PHP-based templating.
- TwigEngine: Integration with Twig for powerful templating.
- View: Manages rendering using different engines.
Installation
Install via composer
composer require luminar-organization/render-engine
Usage
Using the BasicEngine
use Luminar\RenderEngine\Engine\BasicEngine; use Luminar\RenderEngine\View; $engine = new BasicEngine('/path/to/views'); $view = new View($renderer); echo $view->render('example', ['name' => 'Luminar'])->getResponse();
Using the TwigEngine
use Luminar\RenderEngine\Engine\TwigEngine; use Luminar\RenderEngine\View; $engine = new TwigEngine('/path/to/views'); $view = new View($engine); echo $view->render('example', ['name' => 'Luminar'])->getResponse();
Contributing
Please see the CONTRIBUTING.md for guidelines in our core repo.
License
This package is licensed under the MIT License
Integration
With these components, you'll have a flexible rendering system in your framework that supports both a simple PHP templating engine and the more advanced Twig templating engine. The setup is extensible, so you can add more engines or features as needed.
统计信息
- 总下载量: 172
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2024-08-20