protected function getSimpleHeaders()
    {
        $out = [];
        foreach ($this->headers as $key => $values) {
            $header = $this->headerNames[strtolower($key)];
            if (count($values) === 1) {
                $values = $values[0];
            }
            $out[$header] = $values;
        }

        return $out;
    }
protected function getSimpleHeaders()
    {
        $out = [];
        foreach ($this->headers as $key => $values) {
            $header = $this->headerNames[strtolower($key)];
            if (count($values) === 1) {
                $values = $values[0];
            }
            $out[$header] = $values;
        }

        return $out;
    }
protected function getSimpleHeaders ( ) { $ out = [ ] ; foreach ( $ this -> headers as $ key => $ values ) { $ header = $ this -> headerNames [ strtolower ( $ key ) ] ; if ( count ( $ values ) === 1 ) { $ values = $ values [ 0 ] ; } $ out [ $ header ] = $ values ; } return $ out ; }
Backwards compatibility helper for getting flattened headers.

Previously CakePHP would store headers as a simple dictionary, now that
we're supporting PSR7, the internal storage has each header as an array.

@return array
Backwards compatibility helper for getting flattened headers .