ParameterBag
class ParameterBag implements IteratorAggregate, Countable
ParameterBag is a container for key/value pairs.
Methods
Constructor.
Returns the parameters.
Returns the parameter keys.
Replaces the current parameters by a new set.
Adds parameters.
Returns a parameter by name.
Sets a parameter by name.
Returns true if the parameter is defined.
Removes a parameter.
Returns the alphabetic characters of the parameter value.
Returns the alphabetic characters and digits of the parameter value.
Returns the digits of the parameter value.
Returns the parameter value converted to integer.
Returns the parameter value converted to boolean.
Filter key.
Returns an iterator for parameters.
Returns the number of parameters.
Details
at line line 33
__construct(array $parameters = array())
Constructor.
at line line 43
array
all()
Returns the parameters.
at line line 53
array
keys()
Returns the parameter keys.
at line line 63
replace(array $parameters = array())
Replaces the current parameters by a new set.
at line line 73
add(array $parameters = array())
Adds parameters.
at line line 88
mixed
get(string $key, mixed $default = null)
Returns a parameter by name.
at line line 99
set(string $key, mixed $value)
Sets a parameter by name.
at line line 111
bool
has(string $key)
Returns true if the parameter is defined.
at line line 121
remove(string $key)
Removes a parameter.
at line line 134
string
getAlpha(string $key, string $default = '')
Returns the alphabetic characters of the parameter value.
at line line 147
string
getAlnum(string $key, string $default = '')
Returns the alphabetic characters and digits of the parameter value.
at line line 160
string
getDigits(string $key, string $default = '')
Returns the digits of the parameter value.
at line line 174
int
getInt(string $key, int $default)
Returns the parameter value converted to integer.
at line line 187
bool
getBoolean(string $key, mixed $default = false)
Returns the parameter value converted to boolean.
at line line 204
mixed
filter(string $key, mixed $default = null, int $filter = FILTER_DEFAULT, mixed $options = array())
Filter key.
at line line 226
ArrayIterator
getIterator()
Returns an iterator for parameters.
at line line 236
int
count()
Returns the number of parameters.