Example #1
0
 function __construct()
 {
     $this->logger = new KLogger('log' . DS . date("Ymd") . '.log', KLogger::DEBUG);
     $this->request = new Request();
     Router::parseURL($this->request->url, $this->request);
     $controller = $this->loadController();
     $this->loadConfiguration();
     $action = $this->request->action;
     if (!in_array($action, array_diff(get_class_methods($controller), get_class_methods('Controller')))) {
         $this->error();
     }
     call_user_func_array(array($controller, $action), $this->request->params);
     $controller->render($action);
 }