private function determineHeader(array $server): MapInterface
    {
        $header = new Map();

        foreach ($server as $name => $value) {
            if (strpos($name, 'HTTP_') === 0) {
                $name = substr($name, 5);
                $name = explode('_', $name);
                $name = array_map('strtolower', $name);
                $name = array_map('ucfirst', $name);
                $name = implode('-', $name);

                $header->set($name, $value);
            }
        }

        return new ReadOnlyMap($header);
    }
private function determineHeader(array $server): MapInterface
    {
        $header = new Map();

        foreach ($server as $name => $value) {
            if (strpos($name, 'HTTP_') === 0) {
                $name = substr($name, 5);
                $name = explode('_', $name);
                $name = array_map('strtolower', $name);
                $name = array_map('ucfirst', $name);
                $name = implode('-', $name);

                $header->set($name, $value);
            }
        }

        return new ReadOnlyMap($header);
    }
private function determineHeader ( array $ server ) : MapInterface { $ header = new Map ( ) ; foreach ( $ server as $ name => $ value ) { if ( strpos ( $ name , 'HTTP_' ) === 0 ) { $ name = substr ( $ name , 5 ) ; $ name = explode ( '_' , $ name ) ; $ name = array_map ( 'strtolower' , $ name ) ; $ name = array_map ( 'ucfirst' , $ name ) ; $ name = implode ( '-' , $ name ) ; $ header -> set ( $ name , $ value ) ; } } return new ReadOnlyMap ( $ header ) ; }
Determines the header by using passed server configuration.

@param string[] $server
The server configuration.
@return MapInterface The determined header as a map.
Determines the header by using passed server configuration .