| 1 | <?php |
||
| 18 | class SameSubnetStrategy extends AbstractHttpStrategy |
||
| 19 | { |
||
| 20 | /** @var String */ |
||
| 21 | protected $subnet; |
||
| 22 | |||
| 23 | /** |
||
| 24 | * @param String $subnet Subnet to be checked (e.g. 10.2.0.0/24) |
||
| 25 | */ |
||
| 26 | 4 | public function __construct($subnet) |
|
| 30 | |||
| 31 | /** |
||
| 32 | * Applies the defined strategy on the provided request. |
||
| 33 | * |
||
| 34 | * @param Request $request request to handle |
||
| 35 | * |
||
| 36 | * @return string |
||
| 37 | */ |
||
| 38 | public function apply(Request $request) |
||
| 46 | |||
| 47 | /** |
||
| 48 | * Decider to stop other strategies running after from being considered. |
||
| 49 | * |
||
| 50 | * @return boolean |
||
| 51 | */ |
||
| 52 | public function stopPropagation() |
||
| 56 | } |
||
| 57 |