class HeaderValue implements Stringable

Constants

protected BASE64_PREFIX

protected BASE64_SUFFIX

Methods

__construct(string $value)

Create a header value.

static HeaderValue
fromHeader(string $header)

Decode a plain or base64-encoded header.

bool
matches(string $value)

Determine whether the header represents the given value.

string
__toString()

Encode the value for use in an HTTP header.

static bool
isBase64(string $value)

Determine whether the value uses the base64 header envelope.

Details

at line 18
__construct(string $value)

Create a header value.

Parameters

string $value

at line 25
static HeaderValue fromHeader(string $header)

Decode a plain or base64-encoded header.

Parameters

string $header

Return Value

HeaderValue

at line 43
bool matches(string $value)

Determine whether the header represents the given value.

Parameters

string $value

Return Value

bool

at line 51
string __toString()

Encode the value for use in an HTTP header.

Return Value

string

at line 63
static protected bool isBase64(string $value)

Determine whether the value uses the base64 header envelope.

Parameters

string $value

Return Value

bool