Final Class Yiisoft\RequestProvider\RequestCatcherMiddleware
| Inheritance | Yiisoft\ |
|---|---|
| Implements | Psr\ |
Stores request into {@see RequestProviderInterface}.
You need to add this into your application middleware stack.
Public Methods
| Method | Description | Defined By |
|---|---|---|
| __construct() | Yiisoft\ |
|
| process() | Yiisoft\ |
Method Details
| public mixed __construct ( Yiisoft\ | ||
| $provider | Yiisoft\ |
The request provider. |
public function __construct(
private readonly RequestProviderInterface $provider,
) {}
| public \ | ||
| $request | \ |
|
| $handler | \ |
|
public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface
{
$this->provider->set($request);
return $handler->handle($request);
}
User Contributed Notes
Leave a comment
Join the conversation to share a note.