public function getIntegerRange($name, $minimum, $maximum, $default = self::REQUIRED_OPTION)
{
assert('is_string($name)');
assert('is_int($minimum)');
assert('is_int($maximum)');
$ret = $this->getInteger($name, $default);
if ($ret === $default) {
// the option wasn't found, or it matches the default value. In any case, return this value
return $ret;
}
if ($ret < $minimum || $ret > $maximum) {
throw new Exception($this->location . ': Value of option ' . var_export($name, true) . ' is out of range. Value is ' . $ret . ', allowed range is [' . $minimum . ' - ' . $maximum . ']');
}
return $ret;
}