Example #1
0
 /**
  * Export the config params to the client, thus the client can adjust it's logic according the config.
  * 
  * @access public
  * @return void
  */
 public function exportConfig()
 {
     $view = new stdclass();
     $view->version = $this->config->version;
     $view->requestType = $this->config->requestType;
     $view->pathType = $this->config->pathType;
     $view->requestFix = $this->config->requestFix;
     $view->moduleVar = $this->config->moduleVar;
     $view->methodVar = $this->config->methodVar;
     $view->viewVar = $this->config->viewVar;
     $view->sessionVar = $this->config->sessionVar;
     $this->session->set('rand', mt_rand(0, 10000));
     $view->sessionName = session_name();
     $view->sessionID = session_id();
     $view->rand = $this->session->rand;
     $view->expiredTime = ini_get('session.gc_maxlifetime');
     echo json_encode($view);
 }