SendHeader hook, used for testing.

@param string $key The header key.
@param string $value The header value.

@access private
544002
private static function sendHeader($key, $value) {
    if (isset(self::$send_header)) {
      call_user_func(self::$send_header, $key, $value);
    } else {
      header(sprintf("%s: %s", $key, $value));
    }
  }
765478
protected function setHeader($name, $value)
    {
        $this->headers[strtolower($name)] = new Header($name, $value);
    }
436433
public function addHeader($key, $value)
    {
        $this->options[GuzzleRequestOptions::HEADERS][$key] = $value;

        return $this;
    }
30317
public function set($key,$value)
    {
        $file=$this->getCacheDir().$key;
        file_put_contents($file, serialize($value));
    }
186476
public function addDefaultHeader($key, $value) {
		if (!is_string($key)) {
			throw new \InvalidArgumentException('The header key must be a string.');
		}

		$defaultHeaders[$key] = $value;
		return $this;
	}
1125605
public function setHeader($key, $value)
    {
        $this->headers[$key] = $value;

        //Headers can't be passed as key: value associative array
        $tmpHeaders = array();
        foreach($this->headers as $tmpKey => $tmpValue)
        {
            $tmpHeaders[] = "$tmpKey: $tmpValue";
        }

        curl_setopt($this->handle, CURLOPT_HTTPHEADER, $tmpHeaders);
    }
1328848
public function update($key, $value)
    {
        if (!empty($this->get($this->normalizeKey($key)))) {
            $this->headers[$this->normalizeKey($key)] = $value;
        }
    }
1172157
public function addHeader($key, $value = null, $toLower = true)
    {
        if (is_array($key)) {
            foreach ($key as $k => $v) {
                $this->addHeader($k, $v);
            }
        } else {
            if ($value !== null) {
                if ($toLower === true) {
                    $key = strtolower($key);
                }
                if (!isset($this->_headers[$key])) {
                    $this->_headers[$key] = $value;
                } else {
                    if (is_array($this->_headers[$key])) {
                        $this->_headers[$key][] = $value;
                    } else {
                        $this->_headers[$key] = [$this->_headers[$key], $value];
                    }
                }
            }
        }
    }
203194
public function add($key, $value)
    {
        $header = $this->get($key, true);
        if (is_array($value)) {
            $header = array_merge($header, $value);
        } else {
            $header[] = $value;
        }
        parent::set($this->normalizeKey($key), $header);
    }
464525
public function addGlobalHeader($key, $value = null)
    {
        if ($key instanceof Header) {
            $header = $key;
            $this->headers[$header->getKey()]
                = $header->getValue();
            return;
        }
        $this->headers[$key] = (string)$value;
    }
949729
protected function sendHeader($header, $content)
    {
        if (!headers_sent() && self::$sendHeaders) {
            header(sprintf('%s: %s', $header, $content));
        }
    }
1273069
public function setHeader($key, $value = null, $preserveCase = false)
	{
		if ($value === null) {
			list($key, $value) = explode(':', $value, 2);
		}

		if (!$preserveCase) {
			$key = strtolower($key);
		}
		
		$key = trim($key);
		$this->headers[$key] = trim($value);

		return $this;
	}
229805
private function setHeader($name, $value = null, $httpResponseCode = null)
    {
        header($name . ($value ? ': ' . $value : ''), true, $httpResponseCode);
    }
109178
public function setHeaders($key, $value = null)
    {
        if (is_array($key)) {
            foreach ($key as $a_key => $value) {
                $this->headers[strtolower($a_key)] = "$a_key: $value";
            }
        } elseif (empty($value)) {
            $this->headers[] = $key;
        } else {
            $this->headers[strtolower($key)] = "$key: $value";
        }

        return $this;
    }
214017
public static function set($key, $value) {
        if (!isset(self::$config['settings'])) {
            self::$config['settings'] = array();
        }

        self::$config['settings'][$key] = $value;
    }
780094
public function add(string $name, string $value): void
    {
        $key = strtolower($name);
        if (!isset($this->headers[$key])) {
            $this->headers[$key] = [$name, $value];

            return;
        }

        $this->headers[$key] = [$name, $this->headers[$key][1] . ', ' . $value];
    }
153003
public static function setUrlParameter(string $key, $value=null) :void {
		
		// set the value
		self::$_get[$key] = $value;
		
	}