hi folks!!

i've added a new library for config, Allow multi-site, views, and language
setting.
It's compatible with old $config array and configuration stored in
aiki_config, but can overwrite this values.

For example if you add this record in aiki_configs (note the s):
config_name: db_pass, config_selector="*/*/*" config_value="i:111;"...
the $config["db_pass"] will be erased (but connection remains), given your a
more secured aiki.


in few word:
-----------------
use
if (  config("weather") )...//yes, a function.

instead
if ( isset($config["weather"]) && $config["weather"]  )

use
$cache_css= config("cache_css");
instead
$cache_css = config["cache_css"])
the reason? with config() you can define diferent values for sites,views or
language.

use
timeout= config("timeout",5000);
instead
if ( isset($config["timeout"]) )
  $timeout=$config["timeout];
else
 $timeout=5000;

to store a setting:
config_set("title","my web");
config_set("title","nire web","*/*/eu);  // a title for my site in euskera
(basque)
config_set("cache_css",false,"*/dark/*")  // deactive cache in dark view.

ah, config, and  config_set are shortcut for $aiki->config->get and
$aiki->config->set respectively.

Debug TIP
create a view called 'debug',  make it active for all sites. and create in
aiki_configs record as
css_cache, false, "*/debug/*", false
html_cache, false, "*/debug/*, false.
debug, 1 ,"*/debug/*",
....and so on.....


TODO
- admin, editing.
- doc in wiki using http://www.aikiframework.org/wiki/Config_class

PD (code is documented using php-doc)


roger.
_______________________________________________
Mailing list: https://launchpad.net/~aikiframework-devel
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~aikiframework-devel
More help   : https://help.launchpad.net/ListHelp

Reply via email to