<?php include "config/config_include.php"; //get the good controller $controllername = $configReader->getControllerName(); if (class_exists($controllername)) { $FC = new $controllername($smarty); } else { $FC = new FrontController($smarty); echo 'The `myLocalUse` in your config.json is incorrect'; } $FC->catchGlobData(); $FC->displayTpl($templateList);
<?php require_once "./config/config_include.php"; $db = null; $ModulesController = new ModulesController($smarty, $db); $ModulesController->instanceModuleList(); $hookData = $ModulesController->catchAllHook(); $FrontController = new FrontController($smarty, $db, $templateList, $hookData); $FrontController->catchGlobData(); $FrontController->displayTpl();