class ServerBag extends ParameterBag
ServerBag is a container for HTTP headers from the $_SERVER variable.
Methods
|
__construct(array $parameters = array())
Constructor. |
from ParameterBag | |
| array |
all()
Returns the parameters. |
from ParameterBag |
| array |
keys()
Returns the parameter keys. |
from ParameterBag |
|
replace(array $parameters = array())
Replaces the current parameters by a new set. |
from ParameterBag | |
|
add(array $parameters = array())
Adds parameters. |
from ParameterBag | |
| mixed |
get(string $path, mixed $default = null, boolean $deep = false)
Returns a parameter by name. |
from ParameterBag |
|
set(string $key, mixed $value)
Sets a parameter by name. |
from ParameterBag | |
| Boolean |
has(string $key)
Returns true if the parameter is defined. |
from ParameterBag |
|
remove(string $key)
Removes a parameter. |
from ParameterBag | |
| string |
getAlpha(string $key, mixed $default = '', boolean $deep = false)
Returns the alphabetic characters of the parameter value. |
from ParameterBag |
| string |
getAlnum(string $key, mixed $default = '', boolean $deep = false)
Returns the alphabetic characters and digits of the parameter value. |
from ParameterBag |
| string |
getDigits(string $key, mixed $default = '', boolean $deep = false)
Returns the digits of the parameter value. |
from ParameterBag |
| integer |
getInt(string $key, mixed $default, boolean $deep = false)
Returns the parameter value converted to integer. |
from ParameterBag |
| mixed |
filter(string $key, mixed $default = null, boolean $deep = false, integer $filter = FILTER_DEFAULT, mixed $options = array())
Filter key. |
from ParameterBag |
| ArrayIterator |
getIterator()
Returns an iterator for parameters. |
from ParameterBag |
| int |
count()
Returns the number of parameters. |
from ParameterBag |
| array |
getHeaders()
Gets the HTTP headers. |
Details
in ParameterBag at line 37
public
__construct(array $parameters = array())
Constructor.
in ParameterBag at line 49
public array
all()
Returns the parameters.
in ParameterBag at line 61
public array
keys()
Returns the parameter keys.
in ParameterBag at line 73
public
replace(array $parameters = array())
Replaces the current parameters by a new set.
in ParameterBag at line 85
public
add(array $parameters = array())
Adds parameters.
in ParameterBag at line 103
public mixed
get(string $path, mixed $default = null, boolean $deep = false)
Returns a parameter by name.
in ParameterBag at line 160
public
set(string $key, mixed $value)
Sets a parameter by name.
in ParameterBag at line 174
public Boolean
has(string $key)
Returns true if the parameter is defined.
in ParameterBag at line 186
public
remove(string $key)
Removes a parameter.
in ParameterBag at line 202
public string
getAlpha(string $key, mixed $default = '', boolean $deep = false)
Returns the alphabetic characters of the parameter value.
in ParameterBag at line 218
public string
getAlnum(string $key, mixed $default = '', boolean $deep = false)
Returns the alphabetic characters and digits of the parameter value.
in ParameterBag at line 234
public string
getDigits(string $key, mixed $default = '', boolean $deep = false)
Returns the digits of the parameter value.
in ParameterBag at line 251
public integer
getInt(string $key, mixed $default, boolean $deep = false)
Returns the parameter value converted to integer.
in ParameterBag at line 269
public mixed
filter(string $key, mixed $default = null, boolean $deep = false, integer $filter = FILTER_DEFAULT, mixed $options = array())
Filter key.
in ParameterBag at line 291
public ArrayIterator
getIterator()
Returns an iterator for parameters.
in ParameterBag at line 301
public int
count()
Returns the number of parameters.
at line 28
public array
getHeaders()
Gets the HTTP headers.