blackcube/ssr
最新稳定版本:1.0.0
Composer 安装命令:
composer require blackcube/ssr
包简介
Server-side routing and rendering bridge for blackcube/dcore
README 文档
README
Server-side routing bridge for Blackcube CMS. Maps dcore slugs to PHP handlers, injects SEO metadata, handles errors — all through PSR-15 middleware.
Where ssr sits
┌────────────────────────────┐
│ your app (Yii/Slim/Laravel) │
└──────────────┬─────────────┘
↓
┌──────────────────────┐
│ ssr ← you are here │
│ routing, SEO, handlers│
└───────────┬──────────┘
↓
┌──────────┐
│ dcore │
│ (data) │
└──────────┘
↓
DB
Quickstart
composer require blackcube/ssr
#[RoutingHandler(route: 'page')] final class PageHandler implements RequestHandlerInterface { public function __construct( private readonly Content $content, private readonly WebViewRenderer $viewRenderer, ) {} public function handle(ServerRequestInterface $request): ResponseInterface { return $this->viewRenderer->render('page', ['content' => $this->content]); } }
Documentation
- Installation — requirements, configuration, DI wiring
- Routing — middleware, handler registry, attributes, dispatch modes
- SEO — Xeo injection, meta tags, Open Graph, Twitter Cards, JSON-LD
- Errors — fallback handler, throwable factory, error handler registration
- Integration — PSR and Yii integration, Quill helper
License
BSD-3-Clause. See LICENSE.md.
统计信息
- 总下载量: 33
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 3
- 依赖项目数: 1
- 推荐数: 1
其他信息
- 授权协议: BSD-3-Clause
- 更新时间: 2026-03-03