CoreFiles by mySites.guru
InvalidForwardedHeaderNameException.php28 lines, 735 bytes, from Joomla_5.0.0-alpha1-Alpha-Full_Package.zip
Raw History Compare with 4.4.0-alpha4
md5
ab09d2f43d258bcf0cb9bdbf34bebc6b
sha1
b13c14b88919ee1cf7518172da9697478383b39f
sha256
15e36bc58cbcfc70bc884372ecb2f18b6b3d503dd89774cd1f638982652bcf7d
<?php

declare(strict_types=1);

namespace Laminas\Diactoros\Exception;

use Laminas\Diactoros\ServerRequestFilter\FilterUsingXForwardedHeaders;

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

class InvalidForwardedHeaderNameException extends RuntimeException implements ExceptionInterface
{
    public static function forHeader(mixed $name): self
    {
        if (! is_string($name)) {
            $name = sprintf('(value of type %s)', is_object($name) ? $name::class : gettype($name));
        }

        return new self(sprintf(
            'Invalid X-Forwarded-* header name "%s" provided to %s',
            $name,
            FilterUsingXForwardedHeaders::class
        ));
    }
}

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.