3 declare(strict_types=1);
5 namespace Laminas\Diactoros\Exception;
8 use function is_object;
11 class InvalidProxyAddressException extends RuntimeException implements ExceptionInterface
13 public static function forInvalidProxyArgument(mixed $proxy): self
15 $type = is_object($proxy) ? $proxy::class : gettype($proxy);
16 return new self(sprintf(
17 'Invalid proxy of type "%s" provided;'
18 . ' must be a valid IPv4 or IPv6 address, optionally with a subnet mask provided'
19 . ' or an array of such values',
24 public static function forAddress(string $address): self
26 return new self(sprintf(
27 'Invalid proxy address "%s" provided;'
28 . ' must be a valid IPv4 or IPv6 address, optionally with a subnet mask provided',