Example #1
0
 public function run()
 {
     if (!empty($this->action)) {
         $this->controller->{$this->action}($this->params);
     }
     if (Request::IsAjax()) {
         header("Content-type: application/json");
     }
     echo $this->view->render();
 }
Example #2
0
 /**
  *
  *
  * @return string
  */
 public static function InfoForLog()
 {
     $result = $_SERVER['REMOTE_ADDR'] . ':' . $_SERVER['SERVER_PORT'] . ' ' . $_SERVER['REQUEST_METHOD'] . (Request::IsAjax() ? '(AJAX)' : '') . ' ' . (isset($_SERVER['PATH_INFO']) ? $_SERVER['PATH_INFO'] : $_SERVER["PHP_SELF"]) . '?' . $_SERVER['QUERY_STRING'];
     return $result;
 }