Exemple #1
0
 private function diConfig()
 {
     $cacheFile = $this->appRoot . 'application/src/config/_cache.config.php';
     if ($config = $this->readCache($cacheFile)) {
         return $config;
     }
     $config = new Config($this->appRoot . 'application/src/config/config.default.php');
     $config->merge($this->appRoot . 'application/src/config/config.local.php');
     $config->add('viewPath', $this->appRoot . 'application/src/views/', 'path');
     $this->writeCache($cacheFile, $config->get());
     return $config->get();
 }
 public static function getModuleView($moduleId, $userRequest)
 {
     $destinationModule_ActionIdList = $userRequest->getHttpRequestParam("destModActIdList");
     $directAct = "";
     if ($destinationModule_ActionIdList != null && trim($destinationModule_ActionIdList) != "") {
         $directAct = self::getModuleDirectActionName($moduleId, $destinationModule_ActionIdList);
     }
     $moduleInfo = FrameworkModule_table::getModuleInfo($moduleId);
     $moduleClass = $moduleInfo["class"];
     $moduleFile = \Config::getModulesDir() . $moduleInfo["dir_file"] . "/" . $moduleInfo["dir_file"] . ".php";
     include_once $moduleFile;
     $moduleModelFile = \Config::getModulesDir() . $moduleInfo["dir_file"] . "/" . $moduleInfo["dir_file"] . "_model.php";
     include_once $moduleModelFile;
     $moduleViewFile = \Config::getModulesDir() . $moduleInfo["dir_file"] . "/" . $moduleInfo["dir_file"] . "_view.php";
     include_once $moduleViewFile;
     $userRequest->setModuleId($moduleId);
     $mod = new $moduleClass();
     $moduleResponse = $mod->getResponse(clone $userRequest, $directAct);
     return $moduleResponse;
 }