$attributes
$attributes :
Collection of data attributes
ResponseCookieDataCollection
A DataCollection for HTTP response cookies
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, \app\framework\Component\Route\Klein\ResponseCookie|string $value) : \app\framework\Component\Route\Klein\DataCollection\ResponseCookieDataCollection
Set a cookie
A value may either be a string or a ResponseCookie instance String values will be converted into a ResponseCookie with the "name" of the cookie being set from the "key"
Obviously, the developer is free to organize this collection however they like, and can be more explicit by passing a more suggested "$key" as the cookie's "domain" and passing in an instance of a ResponseCookie as the "$value"
string | $key | The name of the cookie to set |
\app\framework\Component\Route\Klein\ResponseCookie|string | $value | The value of the cookie 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. :)