$attributes
$attributes :
Collection of data attributes
ServerDataCollection
A DataCollection for "$_SERVER" like data
Look familiar?
Inspired by @fabpot's Symfony 2's HttpFoundation
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\DataCollection
Set an attribute of the collection
string | $key | The name of the parameter to set |
mixed | $value | The value of the parameter 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. :)