/** * inint index */ public function index() { // ถ้าไม่มีโมดูลเลือกหน้า home $module = empty($_GET['module']) ? 'home' : $_GET['module']; // สร้าง View $view = $this->createClass('Index\\Index\\View'); // template default $view->add(array('MENU' => $this->createClass('Index\\Menu\\Controller')->render($module), 'TITLE' => 'Welcome to GCMS++', 'CONTENT' => \Template::load('', '', $module), 'TIME' => \Datetool::format(\Kotchasan::$mktime))); // output เป็น HTML $view->renderHTML(); }