1 | <?php |
||
18 | class PriorityMiddleware implements PriorityMiddlewareInterface{ |
||
19 | |||
20 | /** |
||
21 | * @var \Psr\Http\Server\MiddlewareInterface |
||
22 | */ |
||
23 | protected $middleware; |
||
24 | |||
25 | /** |
||
26 | * @var int |
||
27 | */ |
||
28 | protected $priority; |
||
29 | |||
30 | /** |
||
31 | * PriorityMiddleware constructor. |
||
32 | * |
||
33 | * @param \Psr\Http\Server\MiddlewareInterface $middleware |
||
34 | * @param int|null $priority |
||
35 | */ |
||
36 | public function __construct(MiddlewareInterface $middleware, int $priority = null){ |
||
40 | |||
41 | /** |
||
42 | * @inheritDoc |
||
43 | */ |
||
44 | public function process(ServerRequestInterface $request, RequestHandlerInterface $handler):ResponseInterface{ |
||
47 | |||
48 | /** |
||
49 | * @inheritDoc |
||
50 | */ |
||
51 | public function getPriority():int{ |
||
54 | |||
55 | } |
||
56 |