Invision Community 4: SEO, prepare for v5 and dormant account notifications By Matt Monday at 02:04 PM
Aetherdan Posted November 7, 2018 Posted November 7, 2018 I have been trying to understand the various classes available with this product and I've recently stumbled across settings. Where is the data accessed from?
Thomas. Posted November 7, 2018 Posted November 7, 2018 Your question is quite ambiguous so I'll try to answer it for a few interpretations. If you refer to where \IPS\Settings gets its own data from: \IPS\Settings gets its data from both the conf_global.php file and the core_sys_conf_settings database table (which is cached, so if the data is available in the cache it will pull it from there). If you mean how to use \IPS\Settings: you simply call whatever setting you need as if it were to be an object property: \IPS\Settings::i()->setting_key Behind the scenes this is achieved with PHP's magic methods __get() and __set().
bfarber Posted November 7, 2018 Posted November 7, 2018 And the class itself is located at system/Settings/Settings.php, but otherwise Thomas.'s answer is pretty comprehensive.
Aetherdan Posted November 7, 2018 Author Posted November 7, 2018 Thanks guys, much appreciated! The answer has certainly assisted me.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.