|
ILIAS
release_5-3 Revision v5.3.23-19-g915713cf615
|
Inheritance diagram for Slim\Http\Headers:
Collaboration diagram for Slim\Http\Headers:Public Member Functions | |
| all () | |
| Return array of HTTP header names and values. More... | |
| set ($key, $value) | |
| Set HTTP header value. More... | |
| get ($key, $default=null) | |
| Get HTTP header value. More... | |
| getOriginalKey ($key, $default=null) | |
| Get HTTP header key as originally specified. More... | |
| add ($key, $value) | |
| Add HTTP header value. More... | |
| has ($key) | |
| Does this collection have a given header? More... | |
| remove ($key) | |
| Remove header from collection. More... | |
| normalizeKey ($key) | |
| Normalize header name. More... | |
Public Member Functions inherited from Slim\Collection | |
| __construct (array $items=[]) | |
| Create new collection. More... | |
| set ($key, $value) | |
| Set collection item. More... | |
| get ($key, $default=null) | |
| Get collection item for key. More... | |
| replace (array $items) | |
| Add item to collection, replacing existing items with the same data key. More... | |
| all () | |
| Get all items in collection. More... | |
| keys () | |
| Get collection keys. More... | |
| has ($key) | |
| Does this collection have a given key? More... | |
| remove ($key) | |
| Remove item from collection. More... | |
| clear () | |
| Remove all items from collection. More... | |
| offsetExists ($key) | |
| Does this collection have a given key? More... | |
| offsetGet ($key) | |
| Get collection item for key. More... | |
| offsetSet ($key, $value) | |
| Set collection item. More... | |
| offsetUnset ($key) | |
| Remove item from collection. More... | |
| count () | |
| Get number of items in collection. More... | |
| getIterator () | |
| Get collection iterator. More... | |
| set ($key, $value) | |
| get ($key, $default=null) | |
| replace (array $items) | |
| all () | |
| has ($key) | |
| remove ($key) | |
| clear () | |
| add ($key, $value) | |
| normalizeKey ($key) | |
Static Public Member Functions | |
| static | createFromEnvironment (Environment $environment) |
| Create new headers collection with data extracted from the application Environment object. More... | |
| static | determineAuthorization (Environment $environment) |
| If HTTP_AUTHORIZATION does not exist tries to get it from getallheaders() when available. More... | |
Static Protected Attributes | |
| static | $special |
Additional Inherited Members | |
Protected Attributes inherited from Slim\Collection | |
| $data = [] | |
This class represents a collection of HTTP headers that is used in both the HTTP request and response objects. It also enables header name case-insensitivity when getting or setting a header value.
Each HTTP header can have multiple values. This class stores values into an array for each header name. When you request a header value, you receive an array of values for that header.
Definition at line 27 of file Headers.php.
| Slim\Http\Headers::add | ( | $key, | |
| $value | |||
| ) |
Add HTTP header value.
This method appends a header value. Unlike the set() method, this method appends this new value to any values that already exist for this header name.
| string | $key | The case-insensitive header name |
| array | string | $value | The new header value(s) |
Implements Slim\Interfaces\Http\HeadersInterface.
Definition at line 173 of file Headers.php.
References $key.
| Slim\Http\Headers::all | ( | ) |
Return array of HTTP header names and values.
This method returns the original header name as specified by the end user.
Reimplemented from Slim\Collection.
Definition at line 98 of file Headers.php.
|
static |
Create new headers collection with data extracted from the application Environment object.
| Environment | $environment | The Slim application Environment |
Definition at line 51 of file Headers.php.
References Slim\Collection\$data, $key, and Slim\Http\Headers\determineAuthorization().
Referenced by Slim\Http\Request\createFromEnvironment().
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
If HTTP_AUTHORIZATION does not exist tries to get it from getallheaders() when available.
| Environment | $environment | The Slim application Environment |
Definition at line 76 of file Headers.php.
References Slim\Collection\get(), and Slim\Collection\set().
Referenced by Slim\Http\Headers\createFromEnvironment().
Here is the call graph for this function:
Here is the caller graph for this function:| Slim\Http\Headers::get | ( | $key, | |
$default = null |
|||
| ) |
Get HTTP header value.
| string | $key | The case-insensitive header name |
| mixed | $default | The default value if key does not exist |
Reimplemented from Slim\Collection.
Definition at line 137 of file Headers.php.
References $key, Slim\Http\Headers\has(), and Slim\Http\Headers\normalizeKey().
Here is the call graph for this function:| Slim\Http\Headers::getOriginalKey | ( | $key, | |
$default = null |
|||
| ) |
Get HTTP header key as originally specified.
| string | $key | The case-insensitive header name |
| mixed | $default | The default value if key does not exist |
Definition at line 154 of file Headers.php.
References $key, Slim\Http\Headers\has(), and Slim\Http\Headers\normalizeKey().
Here is the call graph for this function:| Slim\Http\Headers::has | ( | $key | ) |
Does this collection have a given header?
| string | $key | The case-insensitive header name |
Reimplemented from Slim\Collection.
Definition at line 187 of file Headers.php.
References $key, and Slim\Http\Headers\normalizeKey().
Referenced by Slim\Http\Headers\get(), and Slim\Http\Headers\getOriginalKey().
Here is the call graph for this function:
Here is the caller graph for this function:| Slim\Http\Headers::normalizeKey | ( | $key | ) |
Normalize header name.
This method transforms header names into a normalized form. This is how we enable case-insensitive header names in the other methods in this class.
| string | $key | The case-insensitive header name |
Implements Slim\Interfaces\Http\HeadersInterface.
Definition at line 213 of file Headers.php.
References $key.
Referenced by Slim\Http\Headers\get(), Slim\Http\Headers\getOriginalKey(), Slim\Http\Headers\has(), Slim\Http\Headers\remove(), and Slim\Http\Headers\set().
Here is the caller graph for this function:| Slim\Http\Headers::remove | ( | $key | ) |
Remove header from collection.
| string | $key | The case-insensitive header name |
Reimplemented from Slim\Collection.
Definition at line 197 of file Headers.php.
References $key, Slim\Http\Headers\normalizeKey(), and remove().
Here is the call graph for this function:| Slim\Http\Headers::set | ( | $key, | |
| $value | |||
| ) |
Set HTTP header value.
This method sets a header value. It replaces any values that may already exist for the header name.
| string | $key | The case-insensitive header name |
| string | $value | The header value |
Reimplemented from Slim\Collection.
Definition at line 118 of file Headers.php.
References $key, and Slim\Http\Headers\normalizeKey().
Here is the call graph for this function:
|
staticprotected |
Definition at line 34 of file Headers.php.