1 | <?php |
||
7 | class RangeType extends IntegerType { |
||
8 | |||
9 | /** @var int */ |
||
10 | private $min; |
||
11 | |||
12 | /** @var int */ |
||
13 | private $max; |
||
14 | |||
15 | /** @var int */ |
||
16 | private $step; |
||
17 | |||
18 | /** |
||
19 | * @param int $min |
||
20 | * @param int $max |
||
21 | * @param int $step |
||
22 | */ |
||
23 | public function __construct($min, $max, $step = 1) { |
||
28 | |||
29 | /** |
||
30 | * @return int |
||
31 | */ |
||
32 | public function getMin() { |
||
35 | |||
36 | /** |
||
37 | * @return int |
||
38 | */ |
||
39 | public function getMax() { |
||
42 | |||
43 | /** |
||
44 | * @return int |
||
45 | */ |
||
46 | public function getStep() { |
||
49 | |||
50 | /** |
||
51 | * @param mixed $value |
||
52 | * @return boolean |
||
53 | */ |
||
54 | public function is($value) { |
||
57 | |||
58 | /** |
||
59 | * @return string |
||
60 | */ |
||
61 | public function __toString() { |
||
64 | } |