[ Index ]

PHP Cross Reference of WordPress

title

Body

[close]

/wp-includes/Requests/Response/ -> Headers.php (summary)

Case-insensitive dictionary, suitable for HTTP headers

File Size: 98 lines (2 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

Requests_Response_Headers:: (5 methods):
  offsetGet()
  offsetSet()
  getValues()
  flatten()
  getIterator()


Class: Requests_Response_Headers  - X-Ref

Case-insensitive dictionary, suitable for HTTP headers

offsetGet($key)   X-Ref
Get the given header

Unlike {@see self::getValues()}, this returns a string. If there are
multiple values, it concatenates them with a comma as per RFC2616.

Avoid using this where commas may be used unquoted in values, such as
Set-Cookie headers.

return: string|null Header value
param: string $key

offsetSet($key, $value)   X-Ref
Set the given item

param: string $key Item name
param: string $value Item value

getValues($key)   X-Ref
Get all values for a given header

return: array|null Header values
param: string $key

flatten($value)   X-Ref
Flattens a value into a string

Converts an array into a string by imploding values with a comma, as per
RFC2616's rules for folding headers.

return: string Flattened value
param: string|array $value Value to flatten

getIterator()   X-Ref
Get an iterator for the data

Converts the internal
return: ArrayIterator



Generated: Thu Dec 15 01:00:02 2022 Cross-referenced by PHPXref 0.7.1