| 1441 |
ariadna |
1 |
<?php
|
|
|
2 |
|
|
|
3 |
namespace Psr\Http\Server;
|
|
|
4 |
|
|
|
5 |
use Psr\Http\Message\ResponseInterface;
|
|
|
6 |
use Psr\Http\Message\ServerRequestInterface;
|
|
|
7 |
|
|
|
8 |
/**
|
|
|
9 |
* Participant in processing a server request and response.
|
|
|
10 |
*
|
|
|
11 |
* An HTTP middleware component participates in processing an HTTP message:
|
|
|
12 |
* by acting on the request, generating the response, or forwarding the
|
|
|
13 |
* request to a subsequent middleware and possibly acting on its response.
|
|
|
14 |
*/
|
|
|
15 |
interface MiddlewareInterface
|
|
|
16 |
{
|
|
|
17 |
/**
|
|
|
18 |
* Process an incoming server request.
|
|
|
19 |
*
|
|
|
20 |
* Processes an incoming server request in order to produce a response.
|
|
|
21 |
* If unable to produce the response itself, it may delegate to the provided
|
|
|
22 |
* request handler to do so.
|
|
|
23 |
*/
|
|
|
24 |
public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface;
|
|
|
25 |
}
|