Lines Matching refs:value
11 * Check to see if a field is satisfied by a value
13 * @param string $dateValue Date value to check
14 * @param string $value Value to test
18 public function isSatisfied($dateValue, $value)
20 if ($this->isIncrementsOfRanges($value)) {
21 return $this->isInIncrementsOfRanges($dateValue, $value);
22 } elseif ($this->isRange($value)) {
23 return $this->isInRange($dateValue, $value);
26 return $value == '*' || $dateValue == $value;
30 * Check if a value is a range
32 * @param string $value Value to test
36 public function isRange($value)
38 return strpos($value, '-') !== false;
42 * Check if a value is an increments of ranges
44 * @param string $value Value to test
48 public function isIncrementsOfRanges($value)
50 return strpos($value, '/') !== false;
54 * Test if a value is within a range
56 * @param string $dateValue Set date value
57 * @param string $value Value to test
61 public function isInRange($dateValue, $value)
63 $parts = array_map('trim', explode('-', $value, 2));
69 * Test if a value is within an increments of ranges (offset[-to]/step size)
71 * @param string $dateValue Set date value
72 * @param string $value Value to test
76 public function isInIncrementsOfRanges($dateValue, $value)
78 $parts = array_map('trim', explode('/', $value, 2));
92 // Ensure that the date value is within the range