Returns the build header line.

@param string $name  The header name
@param string $value The header value

@return string The built header line

@deprecated since Symfony 4.3
502835
protected function buildHeader($name, $value)
    {
        @trigger_error(sprintf('The "%s()" method is deprecated since Symfony 4.3.', __METHOD__), E_USER_DEPRECATED);

        return sprintf("%s: %s\n", $name, $value);
    }
814033
public function addHeader($name, $value)
    {
        if (isset($this->headers[$name])) {
            if (is_array($this->headers[$name])) {
                $this->headers[$name][] = $value;
            } else {
                $this->headers[$name] = $value;
            }
        } else {
            $this->headers[$name] = [$value];
        }

        return $this;
    }
1280269
public final function withAddedHeader($name, $value): MessageInterface
   {
       $key = $this->parseHeaderName($name);
       $header = $this->header;
       if (!array_key_exists($key, $header)) {
           $value = $this->parseHeaderValue($value);
           if ("" === $key || [] === $value) {
               throw new InvalidArgumentException(
                   "Can't get instance for added header: invalid " . $name);
           }
           $header[$key] = $value;
       }
       return $this->with("header", $header);
   }
865785
public final function header(string $name, string $value = null)
    {
        return ($value === null) ? $this->getHeader($name) : $this->setHeader($name, $value);
    }
789449
public function getHeaderLines(string $name): array {
        $key = strtolower($name);
        $result = isset($this->headers[$key]) ? $this->headers[$key] : [];
        return $result;
    }
1257402
private function getHeaderValue($name)
    {
        $header = $this->headers[$name];

        if ($header instanceof Claim) {
            return $header->getValue();
        }

        return $header;
    }
475820
public function addHeader($name, $value)
    {
        $this->getSwiftMessage()->getHeaders()->addTextHeader($name, $value);
        return $this;
    }
139674
public function setHeader($name, $value)
    {
        if ($this->signature) {
            throw new \BadMethodCallException('You must unsign before make changes');
        }

        $this->headers[(string) $name] = $this->claimFactory->create($name, $value);

        return $this;
    }
367379
public function withHeader(string $name, $value): Builder
    {
        $this->headers[$name] = $value;

        return $this;
    }
124185
public function getHeader($name)
    {
        $key = strtolower($name);

        if (isset($this->responseHeader[$key])) {
            if (!isset($this->responseHeader[$key]['name']) &&
                 is_array($this->responseHeader[$key])) {
                $values = array();

                foreach ($this->responseHeader[$key] as $header) {
                    $values[] = $header['value'];
                }

                return $values;
            } else {
                return $this->responseHeader[$key]['value'];
            }
        }

        return;
    }
401413
public function addHeader($header, $value)
    {
        $name = strtolower($header);

        if(is_array($value))
        {
            foreach($value as $v)
                $this->headers[$name][] = trim($v);

            foreach(array_keys($this->headerLines) as $key)
                if(strtolower($key) == $name)
                    unset($this->headerLines[$key]);

            $this->headerLines[$header] = $this->headers[$name];
        }
        else
        {
            $this->headers[$name][] = trim($value);

            foreach(array_keys($this->headerLines) as $key)
                if(strtolower($key) == $name)
                    unset($this->headerLines[$key]);

            $this->headerLines[$header] = $this->headers[$name];
        }

        return $this;
    }
45709
public function getLines($name, $default = array())
    {
        $name = $this->normalizeName($name);
        if(!$this->existsNormalized($name)) {
            return $default;
        }
        
        return $this->headers[$name];
    }
818455
public function withHeader($name, $value): self
    {
        $this->assertHeaderName($name);

        $clone = clone $this;
        $clone->headers->set($name, $value);

        if ($clone->getStatusCode() === 200 && strtolower($name) === 'location') {
            $clone = $clone->withStatus(302);
        }

        return $clone;
    }
567910
public T header(String name, String value) {
		return header(name, value, true);
	}
330340
final public function withAddedHeader($name, $value): self
    {
        return $this->withHeader($name, array_merge($this->getHeader($name), (array)$value));
    }
726904
public function setHeader($name, $value)
    {
        $this->response = $this->response->withHeader($name, $value);
        return $this;
    }
628290
public final function withHeader($name, $value): MessageInterface
   {
       $value = $this->parseHeaderValue($value);
       if (!is_string($name) || [] === $value) {
           throw new InvalidArgumentException(
               "Can't get instance for header: invalid " . $name);
       }
       $header = $this->header;
       $header[$this->parseHeaderName($name)] = $value;
       return $this->with("header", $header);
   }