| 1 | <?php |
||
| 7 | abstract class Restricter |
||
| 8 | { |
||
| 9 | /** |
||
| 10 | * @param Request $request |
||
| 11 | */ |
||
| 12 | public function __construct(Request $request) |
||
|
|
|||
| 13 | { |
||
| 14 | $this->request = $request; |
||
| 15 | } |
||
| 16 | |||
| 17 | /** |
||
| 18 | * Do we need to restrict access ? |
||
| 19 | */ |
||
| 20 | abstract public function isRestrictionEnabled(); |
||
| 21 | |||
| 22 | /** |
||
| 23 | * Protection method. |
||
| 24 | * |
||
| 25 | * @return mixed |
||
| 26 | */ |
||
| 27 | abstract public function restrict(); |
||
| 28 | } |
||
| 29 |