The ColdBox Controller (stored in ColdFusion application scope as application.cbController) stores all your application settings and also your system settings:
ColdboxSettings : Framework specific system settings
ConfigSettings : Your application settings
You can use the following methods to retrieve/set/validate settings in your handlers/layouts/views and interceptors:
FrameworkSuperType.cfc
/** * Get a setting from the system * * @nameThe key of the setting * @defaultValue If not found in config, default return value * * @throws SettingNotFoundException * * @return The requested setting */functiongetSetting( required name, defaultValue )/** * Get a ColdBox setting * * @nameThe key to get * @defaultValue The default value if it doesn't exist * * @throws SettingNotFoundException * * @return The framework setting value */functiongetColdBoxSetting( required name, defaultValue )/** * Check if the setting exists in the application * * @nameThe key of the setting */booleanfunctionsettingExists( required name )/** * Set a new setting in the system * * @nameThe key of the setting * @value The value of the setting * * @return FrameworkSuperType */anyfunctionsetSetting( required name, required value )/** * Get a module's settings structure or a specific setting if the setting key is passed * * @moduleThe module to retrieve the configuration settings from * @setting The setting to retrieve if passed * @defaultValue The default value to return if setting does not exist * * @return struct or any */anyfunctiongetModuleSettings( required module, setting, defaultValue )
You can also get access to these methods in handlers via the ColdBox Controller component: