Example #1
0
 public function loadModel($model_name)
 {
     if ($this->module != null) {
         $path = "module/" . $this->module . "/model/" . $model_name . ".php";
         if (file_exists($path)) {
             require_once SYSTEM_PATH . '/mvc/model/Model.php';
             $model = new Model($this->getDb());
             return $model->module_load_model($path, $model_name);
         } else {
             return new TException("Không tìm thấy đường dẫn " . $path . " trong project của bạn", 401);
         }
     } else {
         return new TException("Vui lòng cho biết module cần truy cập. {$this->module}(module cân truy cập)", 401);
     }
 }