Moodle PHP Documentation 4.5
Moodle 4.5dev (Build: 20240606) (d3ae1391abe)
GuzzleHttp\Psr7\Header Class Reference

Static Public Member Functions

static normalize ($header)
 Converts an array of header values that may contain comma separated headers into an array of headers with no comma separated values.
 
static parse ($header)
 
static splitList ($values)
 Splits a HTTP header defined to contain a comma-separated list into each individual value.
 

Member Function Documentation

◆ normalize()

static GuzzleHttp\Psr7\Header::normalize ( $header)
static

Converts an array of header values that may contain comma separated headers into an array of headers with no comma separated values.

Parameters
string | array$headerHeader to normalize.
Deprecated
Use self\splitList() instead.

◆ splitList()

static GuzzleHttp\Psr7\Header::splitList ( $values)
static

Splits a HTTP header defined to contain a comma-separated list into each individual value.

Empty values will be removed.

Example headers include 'accept', 'cache-control' and 'if-none-match'.

This method must not be used to parse headers that are not defined as a list, such as 'user-agent' or 'set-cookie'.

Parameters
string | string[]$valuesHeader value as returned by MessageInterface\getHeader()
Return values
string[]

The documentation for this class was generated from the following file: