Set response header

@param string $key
@param string $value
@return void
433647
protected function setHeader($key, $value)
    {
        if (SERVER_MODE === 'swoole') {
            $GLOBALS['__$response']->header($key, $value);
        } else {
            if (!headers_sent()) {
                header($key . ': '. $value);
            }
        }
    }
1201285
public function addHeaderToRequest($header, $value)
    {
        $this->request = $this->request->withHeader($header, $value);
    }
608710
public function set(string $key, $value)
    {
        $value = static::format($value);
        parent::set($key, $value);
    }
1238947
public function setHeaderClaim(string $key, $value): self
    {
        $this->header[$key] = $value;

        return $this;
    }
986229
public function setHeader($key, $value = null, $toLower = true)
    {
        if (is_array($key)) {
            foreach ($key as $k => $v) {
                $this->setHeader($k, $v);
            }
        } else {
            if ($toLower === true) {
                $key = strtolower($key);
            }
            if ($value === null) {
                unset($this->_headers[$key]);
            } else {
                $this->_headers[$key] = $value;
            }
        }
    }
1032832
public function set($key, $value) {
        header('' . $key . ': ' . $value . '', true);
        $this->vars[$key] = $value;
    }
1100598
public function setResponseHeader($header, $value, $overwrite = true)
    {
        $fn = $overwrite ? 'withHeader' : 'withAddedHeader';
        $response = $this->getResponse()->$fn($header, $value);
        
        $this->setResponse($response);
    }
146318
public function set(string $key, $value = null): void
    {
        $this->offsetSet($key, $value);
    }
1204556
public function addHeader(string $key, string $value): Response
    {
        $this->headers->add($key, $value);
        return $this;
    }
1104500
public function addResponseHeader(ResponseHeader $header, $key = '')
    {
        if (empty($key)) {
            $this->responseHeaders[] = $header->toArray();
        } else {
            $this->responseHeaders[$key] = $header->toArray();
        }

        return $this;
    }
1350864
public function setHeader($header, $value)
    {
        if (is_array($value)) {
            $value = implode(';', $value);
        }

        $this->headers[$header] = $value;
    }
229805
private function setHeader($name, $value = null, $httpResponseCode = null)
    {
        header($name . ($value ? ': ' . $value : ''), true, $httpResponseCode);
    }
1201645
public function setHeader($name, $value)
    {
        $internalName = strtolower($name);

        if (true === is_array($value)) {
            $this->headers[$internalName] = $value;
        } else {
            $this->headers[$internalName] = array($value);
        }
    }
81725
public function setHeader(string $key, $value) : Response
    {
        $this->headers->set($key, $value);

        return $this;
    }
436433
public function addHeader($key, $value)
    {
        $this->options[GuzzleRequestOptions::HEADERS][$key] = $value;

        return $this;
    }
1023960
protected function setHeader($name, $value)
    {
        if (! is_array($value)) {
            $value = [$value];
        }
        $this->headers[$name] = $value;
        $this->headerKeys[strtolower($name)] = $name;
    }
952285
public function usingHeader(string $key, $value): self
    {
        $this->headers->put($key, $value);
        return $this;
    }