new Config(p_config, p_environment)
Parameters:
| Name | Type | Description |
|---|---|---|
p_config |
object | A configuration template object (a JSON object!).
As a template object it may contain @-values that
are replaced by concrete values by means of the
function . |
p_environment |
object | An environment object that is used for computing
a concrete value. It should contain concrete values
for @-values that are referenced by p_config.
For example:
{ '@width': 500,
'@height': 400
}
|
- Source:
Members
-
<static> EMPTY :Config
-
An empty config Object which can be used as a default value.
Type:
- Source:
Methods
-
config()
-
The original configuration object
- Source:
Returns:
- Type
- Object
-
default(p_default)
-
Sets default values for JSON attributes which are not found in the configuration object itself.
Parameters:
Name Type Description p_defaultobject - Source:
-
environment()
-
The environment to be used for
this.config. As all sub objects of a configuration object share the same environment, it suffices to change the content of the environment one of those objects to change the environment of all related config objects.- Source:
Returns:
- Type
- Object
-
isDefined()
-
Returns
true, ifthis.confighas been defined.- Source:
Returns:
- Type
- Boolean
-
isUndefined()
-
Returns
true, ifthis.confighas not been defined.- Source:
Returns:
- Type
- Boolean
-
value(p_config)
-
Parameters:
Name Type Description p_configObject Properties
Name Type Argument Default Description environmentObject <optional>
this.environment() specialsArray.<String> <nullable>
levelnumber <nullable>
- Source:
Returns:
The concretized value ofthis.config()- Type
- Object