thephpleague / route

Fast PSR-7 based routing and dispatch component including PSR-15 middleware, built on top of FastRoute.
http://route.thephpleague.com
MIT License
651 stars 126 forks source link

Why Router does not implement RequestHandlerInterface? #251

Closed PhantomArt closed 4 years ago

PhantomArt commented 5 years ago

Why Router does not implement Psr\Http\Server\RequestHandlerInterface?

It will look closer to the standards:

$response = $router->handle($request);

Juhlinus commented 4 years ago

The dispatcher implements it.

class Dispatcher extends GroupCountBasedDispatcher implements
    MiddlewareAwareInterface,
    RequestHandlerInterface,
    StrategyAwareInterface