1 | <?php |
||
10 | class RestrictRoute |
||
11 | { |
||
12 | protected $options = [ |
||
13 | 'ip' => null, |
||
14 | ]; |
||
15 | |||
16 | /** |
||
17 | * Create new RestrictRoute service provider. |
||
18 | * |
||
19 | * @param array $options |
||
20 | */ |
||
21 | public function __construct(array $options = []) |
||
25 | |||
26 | /** |
||
27 | * RestrictRoute middleware invokable class. |
||
28 | * |
||
29 | * @param \Psr\Http\Message\ServerRequestInterface $request PSR7 request |
||
30 | * @param \Psr\Http\Message\ResponseInterface $response PSR7 response |
||
31 | * @param callable $next Next middleware |
||
32 | * |
||
33 | * @return \Psr\Http\Message\ResponseInterface |
||
34 | */ |
||
35 | public function __invoke($request, $response, $next) |
||
56 | |||
57 | /** |
||
58 | * Get the options array. |
||
59 | * |
||
60 | * @return array |
||
61 | */ |
||
62 | public function getOptions() |
||
66 | |||
67 | /** |
||
68 | * Set the options array. |
||
69 | * |
||
70 | * @param array $options The options array. |
||
71 | */ |
||
72 | public function setOptions($options) |
||
76 | } |
||
77 |