1 | <?php |
||
14 | class RangeMatcher extends CountableMatcher |
||
15 | { |
||
16 | /** |
||
17 | * @var mixed |
||
18 | */ |
||
19 | protected $lowerBound; |
||
20 | |||
21 | /** |
||
22 | * @var mixed |
||
23 | */ |
||
24 | protected $upperBound; |
||
25 | |||
26 | /** |
||
27 | * @param mixed $lower |
||
28 | * @param mixed $upper |
||
29 | */ |
||
30 | public function __construct($lower, $upper) |
||
35 | |||
36 | /** |
||
37 | * {@inheritdoc} |
||
38 | * |
||
39 | * @return TemplateInterface |
||
40 | */ |
||
41 | public function getDefaultCountableTemplate() |
||
48 | |||
49 | /** |
||
50 | * {@inheritdoc} |
||
51 | * |
||
52 | * @return TemplateInterface |
||
53 | */ |
||
54 | public function getDefaultTemplate() |
||
61 | |||
62 | /** |
||
63 | * Set the lower bound of the range matcher. |
||
64 | * |
||
65 | * @param mixed $lowerBound |
||
66 | * @return $this |
||
67 | */ |
||
68 | public function setLowerBound($lowerBound) |
||
78 | |||
79 | /** |
||
80 | * Set the upper bound of the range matcher. |
||
81 | * |
||
82 | * @param mixed $upperBound |
||
83 | * @return $this |
||
84 | */ |
||
85 | public function setUpperBound($upperBound) |
||
95 | |||
96 | /** |
||
97 | * Return the lower bound of the range matcher. |
||
98 | * |
||
99 | * @return mixed |
||
100 | */ |
||
101 | public function getLowerBound() |
||
105 | |||
106 | /** |
||
107 | * Return the upper bound of the range matcher. |
||
108 | * |
||
109 | * @return mixed |
||
110 | */ |
||
111 | public function getUpperBound() |
||
115 | |||
116 | /** |
||
117 | * Determine if the number is between an upper and lower bound (inclusive). |
||
118 | * |
||
119 | * @param $number |
||
120 | * @return bool |
||
121 | */ |
||
122 | protected function matchNumeric($number) |
||
126 | } |
||
127 |