Registry / web-framework / middlewares-fast-route

middlewares-fast-route

JSON →
library2.1.0phppackagistunverified

Middleware to use FastRoute.

composer require middlewares/fast-route
INSTALL
IMPORT
SIG · MIDDLEWARES-FAST-R
M
middlewares-fast-route
web-frameworkphpv2.1.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

FastRoute
use Middlewares\FastRoute;

Creates a FastRoute middleware for PSR-7 requests.

<?php require 'vendor/autoload.php'; use Middlewares\FastRoute; $dispatcher = FastRoute\simpleDispatcher(function(FastRoute\RouteCollector $r) { $r->addRoute('GET', '/hello/{name}', function($name) { echo 'Hello ' . $name; }); }); $middleware = new FastRoute($dispatcher); // Use with PSR-7 request echo 'Middleware created';
Debug
Known issues
gotchaRequires PSR-7 HTTP message implementation.
fix
Install a PSR-7 library like nyholm/psr7 or guzzlehttp/psr7.
affects: >=2.0.0
Upgrade
Version history
2.1.0latest on Packagist
Audit
Dependencies

No dependency data recorded yet.

Agent activity
16 hits · last 30 days
node
12
Resources
middlewares-fast-route — pip install middlewares-fast-route · libregistry