-
removeNamespace ($ns = null)
Browse code
| $ns |
A parameter namespace.
|
Remove A parameter namespace and all of its associated parameters.
-
(array) getNamespaces ()
Browse code
Retrieve an array of parameter namespaces.
returns An indexed array of parameter namespaces.
-
__construct ($namespace = 'symfony/default')
Browse code
The constructor for sfParameterHolder.
The default namespace may be overridden at initialization as follows:
<?php
$mySpecialPH = new sfParameterHolder('symfony/special');
?>
-
(array&) getAll ($ns = null)
Browse code
| $ns |
A parameter namespace.
|
Retrieve an array of parameters, within a namespace.
This method is limited to a namespace. Without any argument, it returns the parameters of the default namespace. If a namespace is passed as an argument, only the parameters of the specified namespace are returned.
returns An associative array of parameters.
-
(string) getDefaultNamespace ()
Browse code
Get the default namespace value.
The $default_namespace is defined as 'symfony/default'.
returns The default namespace.
-
add ($parameters, $ns = null)
Browse code
| $parameters |
An associative array of parameters and their associated values.
|
| $ns |
A parameter namespace.
|
Set an array of parameters.
If an existing parameter name matches any of the keys in the supplied array, the associated value will be overridden.
-
setByRef ($name, [[[amp]]]$value, $ns = null)
Browse code
| $name |
A parameter name.
|
| [[[amp]]]$value |
A reference to a parameter value.
|
| $ns |
A parameter namespace.
|
Set a parameter by reference.
If a parameter with the name already exists the value will be overridden.
-
(mixed&) get ($name, $default = null, $ns = null)
Browse code
| $name |
A parameter name.
|
| $default |
A default parameter value.
|
| $ns |
A parameter namespace.
|
Retrieve a parameter with an optionally specified namespace.
An isolated namespace may be identified by providing a value for the third argument. If not specified, the default namespace 'symfony/default' is used.
returns A parameter value, if the parameter exists, otherwise null.
-
(array) getNames ($ns = null)
Browse code
| $ns |
A parameter namespace.
|
Retrieve an array of parameter names from an optionally specified
namespace.
returns An indexed array of parameter names, if the namespace exists, otherwise null.
-
(string&) remove ($name, $ns = null)
Browse code
| $name |
A parameter name.
|
| $ns |
A parameter namespace.
|
Remove a parameter.
returns A parameter value, if the parameter was removed, otherwise null.
-
set ($name, $value, $ns = null)
Browse code
| $name |
A parameter name.
|
| $value |
A parameter value.
|
| $ns |
A parameter namespace.
|
Set a parameter.
If a parameter with the name already exists the value will be overridden.
-
addByRef ([[[amp]]]$parameters, $ns = null)
Browse code
| [[[amp]]]$parameters |
An associative array of parameters and references to their associated
values.
|
| $ns |
A parameter namespace.
|
Set an array of parameters by reference.
If an existing parameter name matches any of the keys in the supplied array, the associated value will be overridden.
-
(bool) hasNamespace ($ns)
Browse code
| $ns |
A parameter namespace.
|
Indicates whether or not A parameter namespace exists.
returns true, if the namespace exists, otherwise false.
-
Clear all parameters associated with this request.
-
(bool) has ($name, $ns = null)
Browse code
| $name |
A parameter name.
|
| $ns |
A parameter namespace.
|
Indicates whether or not a parameter exists.
returns true, if the parameter exists, otherwise false.