| 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 Injector |
||
| 28 | */ |
||
| 29 | private $injector; |
||
| 30 | |||
| 31 | public function __construct(Closure $if, MiddlewareInterface $then, MiddlewareInterface $else, Injector $injector) |
||
| 38 | |||
| 39 | /** |
||
| 40 | * @inheritDoc |
||
| 41 | */ |
||
| 42 | public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface |
||
| 49 | } |
||
| 50 |