src/Http/Request.php
protected function getAllHeaders()
    {
        $headers = [];

        foreach ($_SERVER as $key => $value) {
            if (substr($key, 0, 5) == 'HTTP_') {
                $key = substr($key, 5);
                $key = str_replace('_', ' ', strtolower($key));
                $key = str_replace(' ', '-', ucwords($key));

                $headers[$key] = $value;
            }
        }

        return $headers;
    }
protected function getAllHeaders()
    {
        $headers = [];

        foreach ($_SERVER as $key => $value) {
            if (substr($key, 0, 5) == 'HTTP_') {
                $key = substr($key, 5);
                $key = str_replace('_', ' ', strtolower($key));
                $key = str_replace(' ', '-', ucwords($key));

                $headers[$key] = $value;
            }
        }

        return $headers;
    }
protected function getAllHeaders ( ) { $ headers = [ ] ; foreach ( $ _SERVER as $ key => $ value ) { if ( substr ( $ key , 0 , 5 ) == 'HTTP_' ) { $ key = substr ( $ key , 5 ) ; $ key = str_replace ( '_' , ' ' , strtolower ( $ key ) ) ; $ key = str_replace ( ' ' , '-' , ucwords ( $ key ) ) ; $ headers [ $ key ] = $ value ; } } return $ headers ; }
Gets headers from `_SERVER` and formats the names nicely.

@return array
Gets headers from _SERVER and formats the names nicely .