NORMALIZE_NONE
NORMALIZE_NONE
Normalization option
Don't normalize
HeaderDataCollection
A DataCollection for HTTP headers
keys(array $mask = null, boolean $fill_with_nulls = true) : array
Returns all of the key names in the collection
If an optional mask array is passed, this only returns the keys that match the mask
array | $mask | The parameter mask array |
boolean | $fill_with_nulls | Whether or not to fill the returned array with values to match the given mask, even if they don't exist in the collection |
all(array $mask = null, boolean $fill_with_nulls = true) : array
Returns all of the attributes in the collection
If an optional mask array is passed, this only returns the keys that match the mask
array | $mask | The parameter mask array |
boolean | $fill_with_nulls | Whether or not to fill the returned array with values to match the given mask, even if they don't exist in the collection |
set(string $key, mixed $value) : \app\framework\Component\Route\Klein\DataCollection\HeaderDataCollection
Set a header
string | $key | The key of the header to set |
mixed | $value | The value of the header to set |
replace(array $attributes = array()) : \app\framework\Component\Route\Klein\DataCollection\DataCollection
Replace the collection's attributes
array | $attributes | The attributes to replace the collection's with |
merge(array $attributes = array(), boolean $hard = false) : \app\framework\Component\Route\Klein\DataCollection\DataCollection
Merge attributes with the collection's attributes
Optionally allows a second boolean parameter to merge the attributes into the collection in a "hard" manner, using the "array_replace" method instead of the usual "array_merge" method
array | $attributes | The attributes to merge into the collection |
boolean | $hard | Whether or not to make the merge "hard" |
clear() : \app\framework\Component\Route\Klein\DataCollection\DataCollection
Clear the collection's contents
Semantic alias of a no-argument $this->replace
call
cloneEmpty() : \app\framework\Component\Route\Klein\DataCollection\DataCollection
A quick convenience method to get an empty clone of the collection. Great for dependency injection. :)
setNormalization(integer $normalization) : \app\framework\Component\Route\Klein\DataCollection\HeaderDataCollection
Set the header key normalization technique/style to use
integer | $normalization |
normalizeName(string $name, boolean $make_lowercase = true) : string
Normalize a header name by formatting it in a standard way
This is useful since PHP automatically capitalizes and underscore separates the words of headers
string | $name | The name ("field") of the header |
boolean | $make_lowercase | Whether or not to lowercase the name |