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.
_______________________________________________
Mailing list: https://launchpad.net/~aikiframework-devel
Post to : [email protected]
Unsubscribe : https://launchpad.net/~aikiframework-devel
More help : https://help.launchpad.net/ListHelp