Class HeaderUtility
Provides helper methods related to HTTP headers
Namespace: Cake\Http
Method Summary
-
parseAccept() public static
Parse the Accept header value into weight => value mapping.
-
parseLinkItem() protected static
Parses one item of the HTTP link header into an array
-
parseLinks() public static
Get an array representation of the HTTP Link header values.
-
parseWwwAuthenticate() public static
Method Detail
parseAccept() ¶ public static
parseAccept(string $header): array<string, list<string>>
Parse the Accept header value into weight => value mapping.
Parameters
-
string
$header The header value to parse
Returns
array<string, list<string>>
parseLinkItem() ¶ protected static
parseLinkItem(string $value): array<string, mixed>
Parses one item of the HTTP link header into an array
Parameters
-
string
$value The HTTP Link header part
Returns
array<string, mixed>
parseLinks() ¶ public static
parseLinks(array $linkHeaders): array
Get an array representation of the HTTP Link header values.
Parameters
-
array
$linkHeaders An array of Link header strings.
Returns
array
parseWwwAuthenticate() ¶ public static
parseWwwAuthenticate(string $value): array
Parameters
-
string
$value The WWW-Authenticate header
Returns
array