CSHttpHeaderValue
in package
HTTP header value class that provides APIs to deal with header values.
Tags
Table of Contents
- __construct() : mixed
- Initializes the header value with the value string
- __toString() : mixed
- Transforms the value object to string
- getField() : string
- Returns a specific field from the header value.
- getFields() : array<string|int, mixed>
- Returns all fields found in the header.
- getValue() : string
- Returns the complete header value as string.
Methods
__construct()
Initializes the header value with the value string
public
__construct([string $sValue = '' ]) : mixed
Parameters
- $sValue : string = ''
-
The header value
Tags
Return values
mixed —__toString()
Transforms the value object to string
public
__toString() : mixed
Tags
Return values
mixed —getField()
Returns a specific field from the header value.
public
getField(string $sName) : string
Parameters
- $sName : string
-
The name of the field to return.
Tags
Return values
string —Returns the field value or null if the field does not exist.
getFields()
Returns all fields found in the header.
public
getFields() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed> —All fields found in the header as key/value pairs. If a field does not have an assigned value (no "=" character), the field is returned with an empty string as value.
getValue()
Returns the complete header value as string.
public
getValue() : string
Tags
Return values
string —The unfiltered header value
