MiddlewareAdapter
in package
implements
MiddlewareInterface
PSR-15 middleware adapter class
Bridges a real PSR-15 Psr\Http\Server\MiddlewareInterface handler into Pop's native middleware queue, translating Pop's handle(mixed $request, \Closure $next) call shape into PSR-15's process(ServerRequestInterface $request, RequestHandlerInterface $handler) shape.
Tags
Table of Contents
Interfaces
- MiddlewareInterface
- Middleware interface
Properties
- $middleware : MiddlewareInterface
- PSR-15 middleware
Methods
- __construct() : mixed
- Constructor
- handle() : mixed
- Handle the request
Properties
$middleware
PSR-15 middleware
protected
MiddlewareInterface
$middleware
Methods
__construct()
Constructor
public
__construct(MiddlewareInterface $middleware) : mixed
Instantiate the middleware adapter object.
Parameters
- $middleware : MiddlewareInterface
handle()
Handle the request
public
handle(mixed $request, Closure $next) : mixed
Parameters
- $request : mixed
- $next : Closure