| API | Package | Subpackage | Class | Method | Reference | Last reviewed | Doc status |
|---|---|---|---|---|---|---|---|
Home |
Joomla.Framework |
Application |
JApplication |
setConfiguration |
setConfiguration() |
Never | Work in Progress |
Sets up the configuration registry. This method will include the specified file, which should specify a class definition for the JConfig class with the appropriate default values for the system configuration parameters. A registry will then be created and the configuration values will be loaded into the registry.
void setConfiguration ( $file, $type )
| $file | string | is a string containing the path to the configuration file |
| $type | string | is a string containing the type of the configuration file. This parameter is optional and if omitted, defaults to ‘config’. |
The Joomla! core calls this method as follows:
Example
$mainframe->setConfiguration(JPATH_CONFIGURATION . DS . 'configuration.php');
JPATH_CONFIGURATION contains the path to the directory that contains the configuration file. Once the configuration registry has been created, the configuration values can then be retrieved using the JApplication::getCfg method.