persistance)){ $config_xml = $config->item; foreach($config_xml as $item){ $this->modules["$item[id]"] = $item; } $this->getModules(); $this->buildConfigMenu(); }else{ echo 'baaaaad persistance...'; } } function getModules(){ foreach($this->modules as $module=>$moduleConf){ if(file_exists('class/'.ucfirst($module).'.php') && $moduleConf->visibility == "true"){ $params = array(); foreach($moduleConf as $confParam){ $params[$confParam->getName()] = "$confParam"; } require ucfirst($module).'.php'; call_user_func(array($module, "start"), $params); } } } function buildConfigMenu(){ echo 'Configuration

Modules configuration


'; foreach($this->modules as $module=>$moduleConf){ echo $module.' module : visibility == "true") echo " checked"; echo '/>true  visibility == "false") echo " checked"; echo '/>false

'; } echo 'Enregistrer
'; } }