CoreFiles by mySites.guru
InvalidProxyAddressException.php31 lines, 883 bytes, from Joomla_6.2.0-beta2-Beta-Full_Package.zip
Raw History Compare with 6.2.0-beta1
md5
cc7359f2e1b757f890bd64c22fdc415e
sha1
6109157efd82343b8e1fcd2f8b47549a628da319
sha256
e3c96db2fe294f7a14679e63eb2c670ca2716f09a8f8ad475799be00ac93a901
<?php

declare(strict_types=1);

namespace Laminas\Diactoros\Exception;

use function get_debug_type;
use function sprintf;

class InvalidProxyAddressException extends RuntimeException implements ExceptionInterface
{
    public static function forInvalidProxyArgument(mixed $proxy): self
    {
        $type = get_debug_type($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 49 releases, Joomla 6.0.0-beta1 to 6.3.0-alpha1. See them all, or every version of this file.