Example #1
0
 /**
  * @throws \Exception
  */
 public function __construct()
 {
     View::initTranslator();
     array_walk_recursive($_GET, [$this, 'trimhtml']);
     array_walk_recursive($_POST, [$this, 'trimhtml']);
     Cunity::init();
     //use the filesdir hash as unique session name
     session_name("cunity-" . Cunity::get("settings")->getSetting("core.filesdir"));
     session_start();
     if (Models\Request::isAjaxRequest()) {
         set_exception_handler([$this, 'handleAjaxException']);
     } else {
         set_exception_handler([$this, 'handleException']);
     }
     $this->handleQuery();
 }