Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. MessageInterface.php

function MessageInterface::getHeaderLine

Retrieves a comma-separated string of the values for a single header.

This method returns all of the header values of the given case-insensitive header name as a string concatenated together using a comma.

NOTE: Not all header values may be appropriately represented using comma concatenation. For such headers, use getHeader() instead and supply your own delimiter when concatenating.

If the header does not appear in the message, this method MUST return an empty string.

Parameters

string $name Case-insensitive header field name.:

Return value

string A string of values as provided for the given header concatenated together using a comma. If the header does not appear in the message, this method MUST return an empty string.

File

vendor/psr/http-message/src/MessageInterface.php, line 115

Class

MessageInterface
HTTP messages consist of requests from a client to a server and responses from a server to a client. This interface defines the methods common to each.

Namespace

Psr\Http\Message

Code

public function getHeaderLine(string $name) : string;

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal