protected function parseRange($input)
{
if ($input === null || $input == '*' || $input == '*.*.*.*' || $input == '0.0.0.0-255.255.255.255') {
return;
}
$range = ['min' => null, 'max' => null, 'mask' => null];
if (mb_strpos($input, '-') !== false) {
list($range['min'], $range['max']) = explode('-', $input);
} elseif (mb_strpos($input, '*') !== false) {
$this->parseRangeUsingWildcards($input, $range);
} elseif (mb_strpos($input, '/') !== false) {
$this->parseRangeUsingCidr($input, $range);
} else {
throw new ComponentException('Invalid network range');
}
if (!$this->verifyAddress($range['min'])) {
throw new ComponentException('Invalid network range');
}
if (isset($range['max']) && !$this->verifyAddress($range['max'])) {
throw new ComponentException('Invalid network range');
}
return $range;
}