CoreFiles by mySites.guru
InvalidProxyAddressException.php32 lines, 929 bytes, from Joomla_5.2.3-Stable-Full_Package.zip
Raw History Compare with 5.2.2
md5
81a9f912cb3a2471223752fcba3ff1cf
sha1
d79a9bfbc00b72db2f4e5f5ae742e895affd4d52
sha256
3cb71cb1d52690444afa60e12defa692a9e566fab0254ccab862b0fb97c42a6c
<?php

declare(strict_types=1);

namespace Laminas\Diactoros\Exception;

use function gettype;
use function is_object;
use function sprintf;

class InvalidProxyAddressException extends RuntimeException implements ExceptionInterface
{
    public static function forInvalidProxyArgument(mixed $proxy): self
    {
        $type = is_object($proxy) ? $proxy::class : gettype($proxy);
        return new self(sprintf(
            'Invalid proxy of type "%s" provided;'
            . ' must be a valid IPv4 or IPv6 address, optionally with a subnet mask provided'
            . ' or an array of such values',
            $type,
        ));
    }

    public static function forAddress(string $address): self
    {
        return new self(sprintf(
            'Invalid proxy address "%s" provided;'
            . ' must be a valid IPv4 or IPv6 address, optionally with a subnet mask provided',
            $address,
        ));
    }
}

The same content is in 109 releases, Joomla 5.0.0-alpha1 to 6.0.0-alpha3. See them all, or every version of this file.