Example #1
0
 public function doAction($action_name = null, $params = array())
 {
     if ($this->outputFormat != 'html') {
         unset($this['title'], $this['current_page'], $this['actions']);
     }
     if (in_array($this->outputFormat, array('json', 'jsonp', 'xml'), true)) {
         try {
             return parent::doAction($action_name, $params);
         } catch (Exception $e) {
             error_log($e);
             $this['errors'][] = $e->getMessage();
             if (!$this->loadView) {
                 return;
             }
             $this->loadView('');
         }
     } else {
         return parent::doAction($action_name, $params);
     }
 }
Example #2
0
<?php

require_once './Event.php';
$Event = new Event($_GET, $_POST);
$MODEL = "Model";
require_once $MODEL . '/Model.php';
$VIEW = "View";
require_once $VIEW . "/KSmarty.php";
$CONTROLLER = "Controller";
require_once $CONTROLLER . '/Controller.php';
$Controller = new Controller($Event);
$Controller->doAction();
$smarty = new KSmarty();
$smarty->display("NavBar.tpl");
?>