Awesome. Good work. I file a blueprint https://blueprints.launchpad.net/aikiframework/+spec/new-config-in-admin-panel
I will work on this. On Tue, 10 Jan 2012 18:58:06 +0100 Roger Martín <[email protected]> wrote: > When load configuration, the class loads all autoloaded variables and > all setting present in array $config array. > (see config.php linea 89-100). So, database settings overwrite > previous values. > > When retrieve a setting (using $class->get or shortcut config > function ), the class seek first in memory ($config array with its > overwrites values), and if no found..seek in database. > > When set a values, the class writes database and changes $config > array. So its backward compatible. > > older code: > $cache = $config(["cache"]) ; > > new using shortcut: > $cache_time = config("css_cache"); > or if you have more time: > global $aiki..; $cache_time = $aiki->config->get("css_cache") > > better: give a default value, so you don't need check if setting > exists $cache_time = config("css_cache", 500); > > > > > Is this "System" tab in Admin Panel an interface to config class? > > > > > System is a interface for old config vars, stored in aiki_config > (without s). > This vars is added (without overwriting values) to $config array file. > (see aiki->get_config method) > > > The config class should have, if it don't already have, ability to > > update values that update database. > > > > Right. The config class need a interface in admin panel. -- Jakub Jankiewicz twitter: @jcubic www: http://jcubic.pl _______________________________________________ Mailing list: https://launchpad.net/~aikiframework-devel Post to : [email protected] Unsubscribe : https://launchpad.net/~aikiframework-devel More help : https://help.launchpad.net/ListHelp

