Add Email Header
@param string|array $header Headers
@param boolean $unique Header is unique
Overwrite the original value if it is
@return boid
962924
private function addHeader ($header, $unique = FALSE)
    {

        // If the header is an array

        if (is_array ($header))
        {

            // Merge the headers arrays

            $this->_headers	= array_merge ($this->_headers, $header);

        }
        else
        {

            // If unique remove any duplicates

            if ($unique)
            {

                $headerArray	= explode (':', $header);
                $headerKey		= $headerArray[0];

                foreach ($this->_headers as $key => $val)
                {

                    if (stripos ($val, $headerKey) === 0)
                    {

                        unset ($this->_headers[$key]);

                    }

                }

            }

            // Add the header to the headers array

            $this->_headers[]	= $header;

        }

    }
887048
protected function MailSend($header, $body)
    {
        $toArr = array();
        foreach ($this->to as $t) {
            $toArr[] = $this->AddrFormat($t);
        }
        $to = implode(', ', $toArr);

        $params = sprintf("-oi -f %s", $this->Sender);
        if ($this->Sender != '' && strlen(ini_get('safe_mode')) < 1) {
            $old_from = ini_get('sendmail_from');
            ini_set('sendmail_from', $this->Sender);
            if ($this->SingleTo === true && count($toArr) > 1) {
                foreach ($toArr as $key => $val) {
                    $rt = @mail($val, $this->EncodeHeader($this->SecureHeader($this->Subject)), $body, $header, $params);
                }
            } else {
                $rt = @mail($to, $this->EncodeHeader($this->SecureHeader($this->Subject)), $body, $header, $params);
            }
        } else {
            if ($this->SingleTo === true && count($toArr) > 1) {
                foreach ($toArr as $key => $val) {
                    $rt = @mail($val, $this->EncodeHeader($this->SecureHeader($this->Subject)), $body, $header, $params);
                }
            } else {
                $rt = @mail($to, $this->EncodeHeader($this->SecureHeader($this->Subject)), $body, $header);
            }
        }
        if (isset($old_from)) {
            ini_set('sendmail_from', $old_from);
        }
        if (!$rt) {
            throw new phpmailerException($this->Lang('instantiate'), self::STOP_CRITICAL);
        }
        return true;
    }
1120795
public function setHeader($header)
    {
        foreach ($this->results as $name) {
            $this->columns->offsetGet($name)->setHeader($header);
        }

        return $this;
    }
490819
protected function addHeader($header)
    {
        switch ($this->canon) {
            case 'nofws':
                // Prepare Header and cascade
                $exploded = explode(':', $header, 2);
                $name = strtolower(trim($exploded[0]));
                $value = str_replace("\r\n", '', $exploded[1]);
                $value = preg_replace("/[ \t][ \t]+/", ' ', $value);
                $header = $name.':'.trim($value)."\r\n";
                // no break
            case 'simple':
                // Nothing to do
        }
        $this->addToHash($header);
    }
1121484
protected function addHeaders(array $headers)
    {
        foreach ($headers as $key => $val) {
            $normalized = strtolower($key);
            $this->headers[$key] = (array)$val;
            $this->headerNames[$normalized] = $key;
        }
    }
918494
public function addHeader($header, $value)
    {
        $header = strtolower($header);
        $this->headers[$header] = $value;
        return $this;
    }
1216085
public function header($headers) {
        // Record HTTP header
        if (is_array($headers)) {
            foreach ($headers as $header) {
                array_push($this->_headers, $header);
            }
        } else if (is_string($headers)) {
            array_push($this->_headers, $headers);
        }
        
        return $this;
    }
1204556
public function addHeader(string $key, string $value): Response
    {
        $this->headers->add($key, $value);
        return $this;
    }
584273
public function addHeader($items)
    {
        if (! is_array($items)) {
            $items = func_get_args();
        }

        $this->addElement(new Header($items));

        return $this;
    }
293729
public function removeHeader($header)
	{
		if($header instanceof HttpHeaderInterface)
		{
			unset($this->headers[strtolower($header->getFieldName())]);
		}
		else
		{
			unset($this->headers[strtolower($header)]);
		}
		
		return $this;
	}
294908
public function set_header($header, $content = null)
	{
		if (is_null($content))
		{
			$this->headers[] = $header;
		}
		else
		{
			$this->headers[$header] = $content;
		}

		return $this;
	}
375419
public function addHeader(string $header, string $value): self
    {
        $this->headers[$header] = $value;

        return $this;
    }
281722
public function setHeader($header)
    {
        $header = trim($header);
        $header = language($header);
        $this->store('header', $header);
        presenter()->meta->title->append($header);

        return $this;
    }
91329
function add($header)
    {
        // convert to object form
        if (is_string($header))
            $header = HeaderField::fromString($header);

        $this->_headers[] = $header;
        return $this;
    }
418612
public function withoutHeader($header)
    {
        if ($this->complete) {
            return $this;
        }

        $new = $this->psrResponse->withoutHeader($header);
        return new self($new);
    }
1221310
public function setHeader(string $header, string $value)
  {
    $found = false;
    # Traverse the headers, searching for a matching header (case insensitive)
    foreach ( $this->headers as $idx => $oldValue )
    {
      if (strcasecmp($this->headers[$idx],$header)==0)
      {
        # Found the header, now replace the value
        $found = true;
        $this->headers[$idx] = $value;
        break;
      }
    }
    # Add the header
    if (!$found) {
      $this->headers[$header] = $value;
    }

    return $this;
  }
811088
public function addCustomHeader($header)
    {
        self::$headers[self::CUSTOM_HEADERS][] = $this->normalizeHeaderName($header);
        return $this;
    }