RKA\Middleware\IpAddress::__construct PHP Метод

__construct() публичный Метод

Constructor
public __construct ( boolean $checkProxyHeaders = false, array $trustedProxies = [], string $attributeName = null, array $headersToInspect = [] )
$checkProxyHeaders boolean Whether to use proxy headers to determine client IP
$trustedProxies array List of IP addresses of trusted proxies
$attributeName string Name of attribute added to ServerRequest object
$headersToInspect array List of headers to inspect
    public function __construct($checkProxyHeaders = false, array $trustedProxies = [], $attributeName = null, array $headersToInspect = [])
    {
        $this->checkProxyHeaders = $checkProxyHeaders;
        $this->trustedProxies = $trustedProxies;
        if ($attributeName) {
            $this->attributeName = $attributeName;
        }
        if (!empty($headersToInspect)) {
            $this->headersToInspect = $headersToInspect;
        }
    }