1 | <?php |
||
13 | trait MiddlewareTrait |
||
14 | { |
||
15 | use AttachToRequestTrait; |
||
16 | |||
17 | /** |
||
18 | * append $middleware after this one, return the new $middlewareStack |
||
19 | * |
||
20 | * @param $middleware |
||
21 | * @return MiddlewarePipe |
||
22 | */ |
||
23 | public function append(MiddlewareInterface $middleware): MiddlewarePipe |
||
31 | |||
32 | /** |
||
33 | * prepend $middleware before this one, return the new $middlewareStack |
||
34 | * |
||
35 | * @param $middleware |
||
36 | * @return MiddlewarePipe |
||
37 | */ |
||
38 | public function prepend(MiddlewareInterface $middleware): MiddlewarePipe |
||
46 | |||
47 | public function when(RequestPredictionInterface $requestPrediction): MiddlewareInterface |
||
51 | |||
52 | public function catch (callable $catcher, string $catchClass = \Throwable::class): MiddlewareInterface |
||
56 | } |
||
57 |