componenta/error-renderer-plates
Composer 安装命令:
composer require componenta/error-renderer-plates
包简介
League Plates renderer integration for Componenta error handling
README 文档
README
League Plates renderer integration for componenta/error-handler. The package renders errors through bundled Plates templates.
Installation
composer require componenta/error-renderer-plates
Main API
use Componenta\Error\Renderer\PlatesRenderer; use League\Plates\Engine; $engine = new Engine(__DIR__ . '/templates'); $renderer = new PlatesRenderer($engine); $html = $renderer->render($exception, $context);
PlatesRenderer requires a League\Plates\Engine. The constructor also accepts:
$defaultTemplate, used when no specific template matches;$debug, which controls whether file, line, trace, and previous exception data are passed to templates;$templateMap, where keys may be exception class names or HTTP status codes.
Bundled templates are stored in templates/ and include generic error, 404, and 500 pages.
Boundary
This package only provides a renderer. It does not provide the application template helper from componenta/templater-app and does not handle response emission.
统计信息
- 总下载量: 0
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 2
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2026-06-14