return a scalar value of \Guzzle\Http\Message\Header type

@param string $header Header name
@param string $glue   Separator (default='')

@return string
541945
public function getHeaderValue($header, $glue = '')
    {
        if ($header = $this->response->getHeader($header, true)) {
            if (is_array($header)) {
                return implode($glue, $header);
            }
        }

        return $header;
    }
528887
private function header2String($header)
    {
        $str = '';
        if (is_array($header)) foreach ($header as $k=>$v) {
            if (is_numeric($k)) continue;
            $str .= $k . ': ' . $v . "\r\n";
        } else {
            $str = $header;
        }
        return $str;
    }
1090291
public function getHeader($header) {
		foreach($this->headers as $k => $v) {
			if($v[0] === $header)
				return $v;
		}
	}
1071115
private function extractPriority($header) {
        if(preg_match('/x\-priority\:.*([0-9]{1,2})/i', $header, $priority)){
            $priority = isset($priority[1]) ? (int) $priority[1] : 0;
            switch($priority){
                case IMAP::MESSAGE_PRIORITY_HIGHEST;
                    $priority = IMAP::MESSAGE_PRIORITY_HIGHEST;
                    break;
                case IMAP::MESSAGE_PRIORITY_HIGH;
                    $priority = IMAP::MESSAGE_PRIORITY_HIGH;
                    break;
                case IMAP::MESSAGE_PRIORITY_NORMAL;
                    $priority = IMAP::MESSAGE_PRIORITY_NORMAL;
                    break;
                case IMAP::MESSAGE_PRIORITY_LOW;
                    $priority = IMAP::MESSAGE_PRIORITY_LOW;
                    break;
                case IMAP::MESSAGE_PRIORITY_LOWEST;
                    $priority = IMAP::MESSAGE_PRIORITY_LOWEST;
                    break;
                default:
                    $priority = IMAP::MESSAGE_PRIORITY_UNKNOWN;
                    break;
            }
        }

        return $priority;
    }
818563
public function parseHeader($header)
    {
        $parsed_header = array();

        $header_lines = explode("\r\n", $header);
        if (count($header_lines) > 0) {
            foreach ($header_lines as $line) {
                $header = explode(':', $line);
                if (count($header) > 1) {
                    $label = array_shift($header);

                    $value = $header;
                    $value = implode(':', $header);
                    $value = trim($value);

                    $parsed_header[$label] = $value;
                }
            }
        }

        return $parsed_header;
    }
201140
private function getHeaderIp(string $header)
    {
        foreach (array_reverse(array_map('trim', explode(',', $header))) as $ip) {
            if (self::isValid($ip) && !$this->isInProxiedIps($ip)) {
                return $ip;
            }
        }
    }
1028337
protected function headers($header)
    {
        $lines = explode("\r\n", $header);

        $headers = [];
        foreach ($lines as $line) {
            $key = explode(':', $line)[0];
            $value = explode(':', $line)[1];
            $headers[$key] = $value;
        }

        return $headers;
    }
463102
public function getHeader($header, $default = null) 
    {
        $name = strtoupper(str_replace('-', '_', $header));
        if (substr($name, 0, 5) != 'HTTP_') {
            $name = 'HTTP_' . $name;
        }
        
        if (($header = $this->getServer($name)) != null) {
            return $header;
        }
        
        return $default;
    }
882420
public function getOutput(string $glue = null)
    {
        if (!is_null($glue)) {
            return implode($glue, $this->output);
        }
        return $this->output;
    }
1065938
public function getHeaderValue($key)
    {
        return isset($this->headers[$key]) ? $this->headers[$key] : null;
    }
108120
public function getHeader($header, $first = true)
    {
        $normalizedHeader = str_replace('-', '_', strtolower($header));
        foreach ($this->headers as $key => $value) {
            if (str_replace('-', '_', strtolower($key)) === $normalizedHeader) {
                if ($first) {
                    return is_array($value) ? (count($value) ? $value[0] : '') : $value;
                }

                return is_array($value) ? $value : array($value);
            }
        }

        return $first ? null : array();
    }
82197
public static function getHeader($header, $default = null)
    {
        $header  = strtolower($header);
        $headers = self::getInstance()->getHeaders();
        $headers = array_change_key_case($headers, CASE_LOWER);
        if (array_key_exists($header, $headers)) {
            $value = \is_array($headers[$header]) ? implode(', ', $headers[$header]) : $headers[$header];
            return $value;
        }
        return $default;
    }
699750
public function fullMessages($glue = null)
    {
        $fullMessages = array();
        
        foreach ($this->errors as $attr => $errors) {
            if ($attr == self::BASE_ERRORS_INDEX) {
                $fullMessages = array_merge($fullMessages, $errors);
            } else {
                foreach ($errors as $message) {
                    $fullMessages[] = $this->fullMessage($attr, $message);
                }
            }
        }
        
        if ($glue !== null) {
            return implode($glue, $fullMessages);
        } else {
            return $fullMessages;
        }
    }
410102
public function hasHeader($header)
	{
		if($header instanceof HttpHeaderInterface)
		{
			return !empty($this->headers[strtolower($header->getFieldName())]);
		}
		
		return !empty($this->headers[strtolower($header)]);
	}
723087
protected function _extractHttpCode($header) {
		preg_match(
			'#^HTTP/[0-9\.]+\s(?P<code>[0-9]+)#i',
			$header,
			$matches
		);

		return isset($matches['code'])
			? $matches['code']
			: $this->_defaultCode;
	}
7972
function getHeader($header)
    {
        if (! $this->hasHeader($header)) {
            if (strtolower($header) === 'host'
                && ($this->uri && $this->uri->getHost())
            )
                return array($this->_getHostFromUri());

            return array();
        }

        $header = $this->_c_headerNormalized[strtolower($header)];
        $value  = $this->headers[$header];
        $value  = is_array($value) ? $value : array($value);
        return $value;
    }
395005
public function getHeader($header)
    {
        if (array_key_exists($header, $this->responseHeaders)) {
            return $this->responseHeaders[$header];
        }
        // Do case-insensitive search
        foreach ($this->responseHeaders as $k => $v) {
            if (strtolower($k) == strtolower($header)) {
                return $v;
            }
        }
    }