ip = $ip; } public static function isValid(string $ip): bool { return Factory::parseAddressString($ip, ParseStringFlag::MAY_INCLUDE_ZONEID) !== null; } public function matches(IRange ... $ranges): bool { foreach ($ranges as $range) { if ($range->contains($this)) { return true; } } return false; } public function __toString(): string { return $this->ip->toString(); } }