| 1 | <?php |
||
| 10 | class CatchMiddleware extends AbstractWrapperMiddleware |
||
| 11 | { |
||
| 12 | /** |
||
| 13 | * @var string |
||
| 14 | */ |
||
| 15 | protected $catchClass; |
||
| 16 | /** |
||
| 17 | * @var callable |
||
| 18 | */ |
||
| 19 | protected $catcher; |
||
| 20 | |||
| 21 | public function __construct($innerMiddleware, callable $catcher, string $catchClass = \Throwable::class) |
||
| 27 | |||
| 28 | public static function catcher(callable $catcher, string $catchClass = \Throwable::class): MiddlewareInterface |
||
| 32 | |||
| 33 | protected function main(): ResponseInterface |
||
| 44 | } |
||
| 45 |