| [ Index ] |
PHP Cross Reference of WordPress Trunk (Updated Daily) |
[Source view] [Print] [Project Stats]
(no description)
| File Size: | 134 lines (4 kb) |
| Included or required: | 0 times |
| Referenced: | 0 times |
| Includes or requires: | 0 files |
HeadersCollection:: (7 methods):
__construct()
get()
getAll()
getAsString()
has()
set()
withHeader()
Class: HeadersCollection - X-Ref
Simple collection for managing HTTP headers with case-insensitive access.| __construct(array $headers = []) X-Ref |
| Constructor. param: array<string, string|list<string>> $headers Initial headers. |
| get(string $name) X-Ref |
| Gets a specific header value. return: list<string>|null The header value(s) or null if not found. param: string $name The header name (case-insensitive). |
| getAll() X-Ref |
| Gets all headers. return: array<string, list<string>> All headers with their original casing. |
| getAsString(string $name) X-Ref |
| Gets header values as a comma-separated string. return: string|null The header values as a comma-separated string or null if not found. param: string $name The header name (case-insensitive). |
| has(string $name) X-Ref |
| Checks if a header exists. return: bool True if the header exists, false otherwise. param: string $name The header name (case-insensitive). |
| set(string $name, $value) X-Ref |
| Sets a header value, replacing any existing value. return: void param: string $name The header name. param: string|list<string> $value The header value(s). |
| withHeader(string $name, $value) X-Ref |
| Returns a new instance with the specified header. return: self A new instance with the header. param: string $name The header name. param: string|list<string> $value The header value(s). |
| Generated : Sat Jun 13 09:38:55 2026 | Cross-referenced by PHPXref |