public function getHeaders(bool $implode = false, bool $ucwords = false): array
    {
        if ($ucwords && $implode) {
            $headers = [];
            foreach ($this->headers as $key => $val) {
                $key = ucwords($key, '-');
                $headers[$key] = implode(', ', $val);
            }

            return $headers;
        } elseif ($ucwords) {
            $headers = [];
            foreach ($this->headers as $key => $val) {
                $key = ucwords($key, '-');
                $headers[$key] = $val;
            }

            return $headers;
        } elseif ($implode) {
            $headers = [];
            foreach ($this->headers as $key => $val) {
                $headers[$key] = implode(', ', $val);
            }

            return $headers;
        }

        return $this->headers;
    }
public function getHeaders(bool $implode = false, bool $ucwords = false): array
    {
        if ($ucwords && $implode) {
            $headers = [];
            foreach ($this->headers as $key => $val) {
                $key = ucwords($key, '-');
                $headers[$key] = implode(', ', $val);
            }

            return $headers;
        } elseif ($ucwords) {
            $headers = [];
            foreach ($this->headers as $key => $val) {
                $key = ucwords($key, '-');
                $headers[$key] = $val;
            }

            return $headers;
        } elseif ($implode) {
            $headers = [];
            foreach ($this->headers as $key => $val) {
                $headers[$key] = implode(', ', $val);
            }

            return $headers;
        }

        return $this->headers;
    }
public function getHeaders ( bool $ implode = false , bool $ ucwords = false ) : array { if ( $ ucwords && $ implode ) { $ headers = [ ] ; foreach ( $ this -> headers as $ key => $ val ) { $ key = ucwords ( $ key , '-' ) ; $ headers [ $ key ] = implode ( ', ' , $ val ) ; } return $ headers ; } elseif ( $ ucwords ) { $ headers = [ ] ; foreach ( $ this -> headers as $ key => $ val ) { $ key = ucwords ( $ key , '-' ) ; $ headers [ $ key ] = $ val ; } return $ headers ; } elseif ( $ implode ) { $ headers = [ ] ; foreach ( $ this -> headers as $ key => $ val ) { $ headers [ $ key ] = implode ( ', ' , $ val ) ; } return $ headers ; } return $ this -> headers ; }
get all headers

@param bool $implode
@param bool $ucwords

@return array
get all headers