Download the PHP package phpdot/routing-rt without Composer
On this page you can find all versions of the php package phpdot/routing-rt. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package routing-rt
phpdot/routing-rt
Real-time routing for WebSocket and SSE, layered on phpdot/routing.
RouterRT extends the HTTP Router and adds ws() and sse() alongside get()/post(), so the same
router — and the same groups, middleware, names, and parameter constraints — serves HTTP, WebSocket, and
Server-Sent Events. WebSocket channels dispatch through phpdot/realtime;
SSE streams through an SSEWriter.
Table of Contents
- Requirements
- Installation
- Usage
- Architecture
- Testing
- License
Requirements
| Requirement | Constraint |
|---|---|
| PHP | >= 8.5 |
phpdot/contracts |
^0.5 |
phpdot/realtime |
^0.5 |
phpdot/routing |
^0.5 |
psr/container |
^2.0 |
psr/http-factory |
^1.0 |
psr/http-message |
^2.0 |
psr/http-server-handler |
^1.0 |
psr/http-server-middleware |
^1.0 |
phpdot/container is a dev-only suggestion — the #[Singleton] attribute on RouterRT is inert until a
phpdot application reflects it.
Installation
Usage
Groups, middleware, names, and where constraints all work across the three, and the same path can serve
both HTTP and WebSocket without collision:
list() returns every route (HTTP, WS, SSE); compile() compiles them all.
Architecture
RouterRT extends the HTTP Router, so HTTP dispatch is unchanged. ws() registers a WsRoute whose
frames are dispatched through the phpdot/realtime Hub (with Ack for request/response over the socket);
sse() registers a handler that streams through an SSEWriter. Because it is a Router, one binding
can make RouterRT the application's router everywhere.
Testing
License
MIT.
This repository is a read-only mirror, generated by CI from phpdot/monorepo. Pull requests and issues belong in the monorepo.
All versions of routing-rt with dependencies
phpdot/contracts Version ^0.6
phpdot/realtime Version ^0.6
phpdot/routing Version ^0.6
psr/container Version ^2.0
psr/http-factory Version ^1.0
psr/http-message Version ^2.0
psr/http-server-handler Version ^1.0
psr/http-server-middleware Version ^1.0