| 1 | <?php |
||
| 19 | class SameSubnetStrategy extends AbstractHttpStrategy |
||
| 20 | { |
||
| 21 | /** @var String */ |
||
| 22 | protected $subnet; |
||
| 23 | |||
| 24 | /** |
||
| 25 | * @param String $subnet Subnet to be checked (e.g. 10.2.0.0/24) |
||
| 26 | 4 | */ |
|
| 27 | public function __construct($subnet) |
||
| 31 | |||
| 32 | /** |
||
| 33 | * Applies the defined strategy on the provided request. |
||
| 34 | * |
||
| 35 | * @param Request $request request to handle |
||
| 36 | * |
||
| 37 | * @return string |
||
| 38 | */ |
||
| 39 | public function apply(Request $request) |
||
| 47 | |||
| 48 | /** |
||
| 49 | * Decider to stop other strategies running after from being considered. |
||
| 50 | * |
||
| 51 | * @return boolean |
||
| 52 | */ |
||
| 53 | public function stopPropagation() |
||
| 57 | |||
| 58 | /** |
||
| 59 | * Provides the list of registered roles. |
||
| 60 | * |
||
| 61 | * @return Role[] |
||
| 62 | */ |
||
| 63 | public function getRoles() |
||
| 67 | } |
||
| 68 |