Public function to create header object

@return HeadersInterface
433316
public function initHeaders()
    {
        if (!isset($this->headers)) {
            $this->headers = new HeadersObject($this->determineHeaders());
        }
        
        return $this->headers;
    }
712384
protected function getHeader(): \SoapHeader
    {
        if ($this->header) {
            return $this->header;
        }

        return $this->header = new \SoapHeader(static::NAMESPACE, 'UserCredentials', [
            'userid'   => $this->login,
            'password' => $this->password,
        ]);
    }
593902
public function create(): self
    {
        $this->payload = null;
        $this->aad = null;
        $this->recipients = [];
        $this->sharedProtectedHeader = [];
        $this->sharedHeader = [];
        $this->compressionMethod = null;
        $this->contentEncryptionAlgorithm = null;
        $this->keyManagementMode = null;

        return $this;
    }
811088
public function addCustomHeader($header)
    {
        self::$headers[self::CUSTOM_HEADERS][] = $this->normalizeHeaderName($header);
        return $this;
    }
1213549
public function withHeader($name, $value)
    {
        $instance = clone $this;
        $instance->headers->set($name, $value);
        return $instance;
    }
425267
private function header()
    {
        $fields = collect($this->entity->fields)->unique('type')->all();
        $codeArray = [];

        foreach ($fields as $name => $options) {
            $type = ucwords($options['type']);
            $className = 'Jaimeeee\\Panel\\Fields\\'.$type.'\\'.$type.'Field';

            if (method_exists($className, 'header')) {
                $codeArray[] = '  '.$className::header();
            }
        }

        return implode(chr(10), $codeArray);
    }
1201165
public static function create($headers)
    {
        $result = new self();
        $result->_requestId = Utilities::tryGetValue(
            $headers,
            Resources::X_MS_REQUEST_ID
        );

        return $result;
    }
1308755
public function createRequest()
    {
        return $this->httpClient->createRequest(
            $this->getMethod(),
            $this->getUrl(),
            $this->getPreparedHeaders(),
            $this->getPreparedData()
        );
    }
391308
function create_header() {
      $header = array();
      $header[] = sprintf("Date: %s\r\n", $this->rfc_date());

      // To be created automatically by mail()
      if($this->Mailer != "mail")
         $header[] = $this->addr_append("To", $this->to);

      $header[] = sprintf("From: %s <%s>\r\n", $this->FromName, trim($this->From));
      if(count($this->cc) > 0)
         $header[] = $this->addr_append("Cc", $this->cc);

      // sendmail and mail() extract Bcc from the header before sending
      if((($this->Mailer == "sendmail") || ($this->Mailer == "mail")) && (count($this->bcc) > 0))
         $header[] = $this->addr_append("Bcc", $this->bcc);

      if(count($this->ReplyTo) > 0)
         $header[] = $this->addr_append("Reply-to", $this->ReplyTo);

      // mail() sets the subject itself
      if($this->Mailer != "mail")
         $header[] = sprintf("Subject: %s\r\n", trim($this->Subject));

      $header[] = sprintf("X-Priority: %d\r\n", $this->Priority);
      $header[] = sprintf("X-Mailer: phpmailer [version %s]\r\n", $this->Version);
      $header[] = sprintf("Return-Path: %s\r\n", trim($this->From));

      // Add custom headers
      for($index = 0; $index < count($this->CustomHeader); $index++)
         $header[] = sprintf("%s\r\n", $this->CustomHeader[$index]);

      if($this->UseMSMailHeaders)
         $header[] = $this->AddMSMailHeaders();

      $header[] = "MIME-Version: 1.0\r\n";

      // Add all attachments
      if(count($this->attachment) > 0 || !empty($this->AltBody))
      {
         // Set message boundary
         $this->boundary = "_b" . md5(uniqid(time()));
         // Set message subboundary for multipart/alternative
         $this->subboundary = "_sb" . md5(uniqid(time()));

         $header[] = "Content-Type: Multipart/Mixed;\r\n";
         $header[] = sprintf(" boundary=\"Boundary-=%s\"\r\n\r\n", $this->boundary);
      }
      else
      {
         $header[] = sprintf("Content-Transfer-Encoding: %s\r\n", $this->Encoding);
         $header[] = sprintf("Content-Type: %s; charset = \"%s\"\r\n\r\n",
                             $this->ContentType, $this->CharSet);
      }

      return(join("", $header));
   }
1369882
public function header() {
		$args = func_get_args();
		$name = $args[0];
		if (count($args) == 2) {
			$this->headers[$name] = $args[1];
		}
		return $this->headers[$name];
	}
418612
public function withoutHeader($header)
    {
        if ($this->complete) {
            return $this;
        }

        $new = $this->psrResponse->withoutHeader($header);
        return new self($new);
    }
1180967
protected function addHeaders()
    {
        if (empty($this->headers)) {
            return $this;
        }

        $this->options[CURLOPT_HTTPHEADER] = $this->headers;
        return $this;
    }
790369
public function createDateHeader($name, DateTimeInterface $dateTime = null)
    {
        $header = new Swift_Mime_Headers_DateHeader($name);
        if (isset($dateTime)) {
            $header->setFieldBodyModel($dateTime);
        }
        $this->setHeaderCharset($header);

        return $header;
    }
1249018
public function addHeader() {
        $height = $this->getRowHeight();
        $definition = $this->rowDefinition;

        $this->copyDefaultColumnDefinitions(null);
        if ($this->trigger(self::EV_HEADER_ADD) !== false) {
            foreach ($this->columnDefinition as $key => $def) {
                $this->addCell($key, $def['header'], $this->columnDefinition, true);
            }
            $this->trigger(self::EV_HEADER_ADDED);
        }
        // reset row definition, because headers also copy their own column
        // definition and override the data row definition already done before
        // this method is called
        $this->setRowHeight($height);
        $this->rowDefinition = $definition;
        return $this;
    }
1182217
public function setHeaders($headers)
    {
        if (!empty($this->headers)) {
            $this->headers = array_merge($this->headers, $headers);
        } else {
            $this->headers = $headers;
        }
        $this->headers = array_merge($this->headers, $headers);

        if ($this->client instanceof \swoole_http_client) {
            $this->client->setHeaders($this->headers);
        }
        return $this;
    }
739908
public function addHeaders(array $headers): Builder
    {
        $this->headers = array_merge($this->headers, $headers);
        $this->removePlugin(Plugin\HeaderAppendPlugin::class);
        $this->addPlugin(new Plugin\HeaderAppendPlugin($this->headers));

        return $this;
    }
1266422
public function showHeader()
    {
        $properties = $this->getProperties();
        $properties['header'] = true;
        $this->setProperties($properties);
        return $this;
    }