pjpawel / magis
PHP 模板引擎
v0.2.0
2022-12-22 23:13 UTC
Requires
- php: >=8.1
Requires (Dev)
- phpstan/phpstan: ^1.9
- phpunit/phpunit: 9.5.*
This package is auto-updated.
Last update: 2024-09-29 06:03:25 UTC
README
用于PHP模板渲染的symfony包服务
为什么选择Magis?
- 它非常快!
- 它很容易理解!
- 它可以实现您所需的所有服务!
安装
如果您想将Magis作为symfony包安装,您应该使用 MagisBundle
composer require pjpawel/magis-bundle
如果您想使用原始视图服务和视图类,请使用(此存储库)
composer require pjpawel/magis
库类
\pjpawel\Magis\ViewDispatcherService::class // service to dependency injection \pjpawel\Magis\View\DirectView::class // simple view class that has method render() to ... render template :) \pjpawel\Magis\View\MagicView::class // rich view class
用法
您应该使用 ViewDispatcherService
作为依赖注入服务。您可以创建自定义服务来渲染视图或直接使用创建的视图。