public function getHeaders()
    {
        $headers = [];
        foreach ($this->_environment as $key => $value) {
            $name = null;
            if (strpos($key, 'HTTP_') === 0) {
                $name = substr($key, 5);
            }
            if (strpos($key, 'CONTENT_') === 0) {
                $name = $key;
            }
            if ($name !== null) {
                $name = str_replace('_', ' ', strtolower($name));
                $name = str_replace(' ', '-', ucwords($name));
                $headers[$name] = (array)$value;
            }
        }

        return $headers;
    }
public function getHeaders()
    {
        $headers = [];
        foreach ($this->_environment as $key => $value) {
            $name = null;
            if (strpos($key, 'HTTP_') === 0) {
                $name = substr($key, 5);
            }
            if (strpos($key, 'CONTENT_') === 0) {
                $name = $key;
            }
            if ($name !== null) {
                $name = str_replace('_', ' ', strtolower($name));
                $name = str_replace(' ', '-', ucwords($name));
                $headers[$name] = (array)$value;
            }
        }

        return $headers;
    }
public function getHeaders ( ) { $ headers = [ ] ; foreach ( $ this -> _environment as $ key => $ value ) { $ name = null ; if ( strpos ( $ key , 'HTTP_' ) === 0 ) { $ name = substr ( $ key , 5 ) ; } if ( strpos ( $ key , 'CONTENT_' ) === 0 ) { $ name = $ key ; } if ( $ name !== null ) { $ name = str_replace ( '_' , ' ' , strtolower ( $ name ) ) ; $ name = str_replace ( ' ' , '-' , ucwords ( $ name ) ) ; $ headers [ $ name ] = ( array ) $ value ; } } return $ headers ; }
Get all headers in the request.

Returns an associative array where the header names are
the keys and the values are a list of header values.

While header names are not case-sensitive, getHeaders() will normalize
the headers.

@return array An associative array of headers and their values.
@link http://www.php-fig.org/psr/psr-7/ This method is part of the PSR-7 server request interface.
Get all headers in the request .