private function getHeader($key)
    {
        if (isset($this->requestHeader[$key])) {
            $header = $this->requestHeader[$key]['value'];

            unset($this->requestHeader[$key]);
        } else {
            if ($key === 'host') {
                $header = $this->getHost();
            } elseif ($key === 'accept') {
                $header = '*/*';
            } elseif ($key === 'user-agent') {
                $header = self::$userAgent;
            }
        }

        return $header;
    }
private function getHeader($key)
    {
        if (isset($this->requestHeader[$key])) {
            $header = $this->requestHeader[$key]['value'];

            unset($this->requestHeader[$key]);
        } else {
            if ($key === 'host') {
                $header = $this->getHost();
            } elseif ($key === 'accept') {
                $header = '*/*';
            } elseif ($key === 'user-agent') {
                $header = self::$userAgent;
            }
        }

        return $header;
    }
private function getHeader ( $ key ) { if ( isset ( $ this -> requestHeader [ $ key ] ) ) { $ header = $ this -> requestHeader [ $ key ] [ 'value' ] ; unset ( $ this -> requestHeader [ $ key ] ) ; } else { if ( $ key === 'host' ) { $ header = $ this -> getHost ( ) ; } elseif ( $ key === 'accept' ) { $ header = '*/*' ; } elseif ( $ key === 'user-agent' ) { $ header = self :: $ userAgent ; } } return $ header ; }
Verifica se existe um header e retorna o seu valor.

@param string $key

@return string
Verifica se existe um header e retorna o seu valor .