TApplicationConfiguration class.
This class is used internally by TApplication to parse and represent application configuration.
| Method Summary |
|
array
|
Returns list of path alias definitions.
|
|
array
|
|
|
boolean
|
|
|
array
|
Returns list of module configurations.
|
|
array
|
Returns list of parameter definitions.
|
|
array
|
Returns list of page initial property values.
|
|
array
|
|
|
array
|
Returns list of namespaces to be used.
|
|
protected
void
|
Loads the external XML configurations.
|
|
void
|
Parses the application configuration file.
|
|
void
|
Parses the application configuration given in terms of a TXmlElement.
|
|
protected
void
|
Loads the modules XML node.
|
|
protected
void
|
Loads the parameters XML node.
|
|
protected
void
|
Loads the paths XML node.
|
|
protected
void
|
Loads the services XML node.
|
| Method Details |
getAliases
| public array getAliases |
() |
Returns list of path alias definitions.
The definitions are aggregated (top-down) from configuration files along the path to the specified page. Each array element represents a single alias definition, with the key being the alias name and the value the absolute path.
| Output |
|
array
| list of path alias definitions |
| Exception |
|
getExternalConfigurations
| public array getExternalConfigurations |
() |
| Output |
|
array
| list of external configuration files. Each element is like $filePath=>$condition |
| Exception |
|
getIsEmpty
| public boolean getIsEmpty |
() |
| Output |
|
boolean
| whether this configuration contains actual stuff |
| Exception |
|
getModules
| public array getModules |
() |
Returns list of module configurations.
The module configurations are aggregated (top-down) from configuration files along the path to the specified page. Each array element represents a single module configuration, with the key being the module ID and the value the module configuration. Each module configuration is stored in terms of an array with the following content ([0]=>module type, [1]=>module properties, [2]=>complete module configuration) The module properties are an array of property values indexed by property names. The complete module configuration is a TXmlElement object representing the raw module configuration which may contain contents enclosed within module tags.
| Output |
|
array
| list of module configurations to be used |
| Exception |
|
getParameters
| public array getParameters |
() |
Returns list of parameter definitions.
The parameter definitions are aggregated (top-down) from configuration files along the path to the specified page. Each array element represents a single parameter definition, with the key being the parameter ID and the value the parameter definition. A parameter definition can be either a string representing a string-typed parameter, or an array. The latter defines a component-typed parameter whose format is as follows, ([0]=>component type, [1]=>component properties) The component properties are an array of property values indexed by property names.
| Output |
|
array
| list of parameter definitions to be used |
| Exception |
|
getProperties
| public array getProperties |
() |
Returns list of page initial property values.
Each array element represents a single property with the key being the property name and the value the initial property value.
| Output |
|
array
| list of page initial property values |
| Exception |
|
getServices
| public array getServices |
() |
| Output |
|
array
| list of service configurations |
| Exception |
|
getUsings
| public array getUsings |
() |
Returns list of namespaces to be used.
The namespaces are aggregated (top-down) from configuration files along the path to the specified page. Each array element represents a single namespace usage, with the value being the namespace to be used.
| Output |
|
array
| list of namespaces to be used |
| Exception |
|
loadExternalXml
| protected void loadExternalXml |
(TXmlElement $includeNode , string $configPath ) |
Loads the external XML configurations.
| Input |
| TXmlElement | $includeNode | the application DOM element |
| string | $configPath | the context path (for specifying relative paths) |
| Output |
| Exception |
|
loadFromFile
| public void loadFromFile |
(string $fname ) |
Parses the application configuration file.
| Input |
| string | $fname | configuration file name |
| Output |
| Exception |
| throws | TConfigurationException if there is any parsing error |
|
loadFromXml
| public void loadFromXml |
(TXmlElement $dom , string $configPath ) |
Parses the application configuration given in terms of a TXmlElement.
| Input |
| TXmlElement | $dom | the XML element |
| string | $configPath | the context path (for specifying relative paths) |
| Output |
| Exception |
|
loadModulesXml
| protected void loadModulesXml |
(TXmlElement $modulesNode , string $configPath ) |
Loads the modules XML node.
| Input |
| TXmlElement | $modulesNode | the modules XML node |
| string | $configPath | the context path (for specifying relative paths) |
| Output |
| Exception |
|
loadParametersXml
| protected void loadParametersXml |
(TXmlElement $parametersNode , string $configPath ) |
Loads the parameters XML node.
| Input |
| TXmlElement | $parametersNode | the parameters XML node |
| string | $configPath | the context path (for specifying relative paths) |
| Output |
| Exception |
|
loadPathsXml
| protected void loadPathsXml |
(TXmlElement $pathsNode , string $configPath ) |
Loads the paths XML node.
| Input |
| TXmlElement | $pathsNode | the paths XML node |
| string | $configPath | the context path (for specifying relative paths) |
| Output |
| Exception |
|
loadServicesXml
| protected void loadServicesXml |
(TXmlElement $servicesNode , string $configPath ) |
Loads the services XML node.
| Input |
| TXmlElement | $servicesNode | the services XML node |
| string | $configPath | the context path (for specifying relative paths) |
| Output |
| Exception |
|