Creates an AbstractHeader instance for the passed header name and value,
and returns it.

@param string $name
@param string $value
@return \ZBateson\MailMimeParser\Header\AbstractHeader
964537
public function newInstance($name, $value)
    {
        $class = $this->getClassFor($name);
        return new $class($this->consumerService, $name, $value);
    }
379082
public function withHeader($name, $value)
    {
        $request = clone $this;
        $request->headers->set($name, $value);

        return $request;
    }
1234129
public static function header($name = null, $value = null) {
        if (!$name && !$value) {
            return Router::getInstance()->response->headers;

        } else if ($name && $value) {
            return Router::getInstance()->response->headers->set($name, $value);

        } else if ($name && !$value) {
            return Router::getInstance()->response->headers->get($name);
        }
    }
686808
public function addHeader($name, $value = null)
    {
        if (is_numeric($name)) {
            $status = $this->getStatus($name);
            if (!empty($status)) {
                $this->headers[] = "{$_SERVER['SERVER_PROTOCOL']} $name $status";
            }
        } elseif (isset($value)) {
            $this->headers[] = "$name: $value";
        }

        return $this;
    }
693499
protected function addHeaderValue(string $name, $value)
    {
        if (!is_scalar($value)) {
            throw new IllegalHeaderValueException($value);
        }

        if (!array_key_exists($name, $this->headersContainer)) {
            $this->headersContainer[$name] = [];
        }

        $this->headersContainer[$name][] = $value;

        return $this;
    }
1299950
protected function withHeader($name, $value)
    {
        $this->headers[ strtolower($name) ] = is_array($value)
            ? $value
            : [ $value ];

        return $this;
    }
1059876
public function addDefaultResponseHeader(string $name, string $value) : AbstractStrategy
    {
        $this->defaultResponseHeaders[strtolower($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;
    }
141641
public function addVarnishHeader($name, $value)
    {
        $header = $value;
        
        if ($this->hasVarnishHeader($name)) {
            $header = $this->getVarnishHeader($name);
            
            if (!is_array($header)) {
                $header = array($header);
            }
            
            $header[] = $value;
        } 
        
        $this->setVarnishHeader($name, $header);
        
        return $this;
    }
157419
public function setHeader($header, $value = NULL)
	{
		if($header instanceof HttpHeaderInterface)
		{
			$this->headers[strtolower($header->getFieldName())] = [[(string)$header->getFieldName(), trim($header->getFieldValue())]];
		}
		else
		{
			$this->headers[strtolower($header)] = [[(string)$header, trim($value)]];
		}
		
		return $this;
	}
876160
protected function addHeader($name, $value)
    {
        $name  = $this->prepareHeaderName($name);
        $value = $this->prepareHeaderValue($value);

        $normalized = strtolower($name);
        if (! isset($this->headerNames[$normalized])) {
            $this->headerNames[$normalized] = $name;
        }

        $header = $this->headerNames[$normalized];

        if (isset($this->rawHeaders[$header])) {
            $this->rawHeaders[$header] = array_merge(
                $this->rawHeaders[$header],
                $value
            );

            return $this;
        }
        $this->rawHeaders[$header] = $value;

        return $this;
    }
1168212
public function setHeader($name, $value)
    {
        $this->getResponse()->headers->set($name, $value);

        return $this;
    }
308798
public function setDefaultHeader(string $name, string $value) {
        $this->defaultHeaders[$name] = $value;
        return $this;
    }
1024473
public function withAddedHeader($name, $value): self
    {
        $this->assertHeaderName($name);

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

        return $clone;
    }
1217330
public function header($name, $value = null)
    {

        if ($value === null) {
            $this->headers[] = $name;
        } else {
            $this->headers[] = $this->headerString($name, $value);
        }

        return $this;
    }
39992
public function header(string $name, $value): HttpRequest
    {
        if (!array_key_exists($name, $this->headers)) {
            $this->headers[$name] = array();
        }
        $this->headers[$name][] = $value;

        return $this;
    }
1001517
public function withHeader($name, $value) : self
    {
        $new = clone $this;

        return $new->setResponse($this->response->withHeader($name, $value));
    }