| 1 | <?php |
||
| 12 | class BlacklistMiddleware implements MiddlewareInterface |
||
| 13 | { |
||
| 14 | private $restriction; |
||
| 15 | |||
| 16 | public function __construct($restriction) |
||
| 20 | |||
| 21 | public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface |
||
| 30 | |||
| 31 | private function isForbidden(string $ip): bool |
||
| 40 | |||
| 41 | private function getIp(ServerRequestInterface $request): string |
||
| 52 | } |
||
| 53 |