1 | <?php |
||
12 | class IfMiddleware implements MiddlewareInterface |
||
13 | { |
||
14 | /** |
||
15 | * @var Closure |
||
16 | */ |
||
17 | private $if; |
||
18 | /** |
||
19 | * @var MiddlewareInterface |
||
20 | */ |
||
21 | private $then; |
||
22 | /** |
||
23 | * @var MiddlewareInterface |
||
24 | */ |
||
25 | private $else; |
||
26 | /** |
||
27 | * @var DiInvoker |
||
28 | */ |
||
29 | private $invoker; |
||
30 | |||
31 | public function __construct(Closure $if, MiddlewareInterface $then, MiddlewareInterface $else, DiInvoker $invoker) |
||
38 | |||
39 | /** |
||
40 | * @inheritDoc |
||
41 | */ |
||
42 | public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface |
||
49 | } |
||
50 |