private function resolveHeaders($headersForResolve)
    {
        $headers = [];

        foreach ($headersForResolve as $name => $value) {
            if (strpos($name, 'REDIRECT_') === 0) {
                $name = substr($name, 9);

                // Do not replace existing variables
                if (array_key_exists($name, $headersForResolve)) {
                    continue;
                }
            }

            if (substr($name, 0, 5) == 'HTTP_' || isset($this->specialHeaders[$name])) {
                $headers[$name] = $value;
            }
        }

        return $headers;
    }
private function resolveHeaders($headersForResolve)
    {
        $headers = [];

        foreach ($headersForResolve as $name => $value) {
            if (strpos($name, 'REDIRECT_') === 0) {
                $name = substr($name, 9);

                // Do not replace existing variables
                if (array_key_exists($name, $headersForResolve)) {
                    continue;
                }
            }

            if (substr($name, 0, 5) == 'HTTP_' || isset($this->specialHeaders[$name])) {
                $headers[$name] = $value;
            }
        }

        return $headers;
    }
private function resolveHeaders ( $ headersForResolve ) { $ headers = [ ] ; foreach ( $ headersForResolve as $ name => $ value ) { if ( strpos ( $ name , 'REDIRECT_' ) === 0 ) { $ name = substr ( $ name , 9 ) ; // Do not replace existing variables if ( array_key_exists ( $ name , $ headersForResolve ) ) { continue ; } } if ( substr ( $ name , 0 , 5 ) == 'HTTP_' || isset ( $ this -> specialHeaders [ $ name ] ) ) { $ headers [ $ name ] = $ value ; } } return $ headers ; }
Resolve headers from provided array

@param array $headersForResolve array compatible with $_SERVER superglobal variable

@return Headers Instance of Headers object from environment
Resolve headers from provided array