| 1 | <?php |
||
| 23 | abstract class BaseMiddleware |
||
| 24 | { |
||
| 25 | |||
| 26 | /** |
||
| 27 | * @var ContainerInterface |
||
| 28 | */ |
||
| 29 | protected $container; |
||
| 30 | |||
| 31 | /** |
||
| 32 | * Middleware constructor. |
||
| 33 | * |
||
| 34 | * @param ContainerInterface $container |
||
| 35 | */ |
||
| 36 | public function __construct(ContainerInterface $container) |
||
| 40 | |||
| 41 | /** |
||
| 42 | * @param null $middleware |
||
| 43 | * |
||
| 44 | * @return bool |
||
| 45 | */ |
||
| 46 | abstract public function __invoke($middleware = null); |
||
| 47 | |||
| 48 | /** |
||
| 49 | * @return ContainerInterface |
||
| 50 | */ |
||
| 51 | public function container(): ContainerInterface |
||
| 55 | |||
| 56 | /** |
||
| 57 | * @param $middleware |
||
| 58 | */ |
||
| 59 | protected function next($middleware) |
||
| 65 | |||
| 66 | /** |
||
| 67 | * @param $middleware |
||
| 68 | * |
||
| 69 | * @return mixed |
||
| 70 | */ |
||
| 71 | protected function handleArray($middleware) |
||
| 82 | } |