public function __construct()
 {
     $config = Kiss_Registry::get("config");
     if ($config->gochannel_url) {
         $this->url = "http://" . $config->gochannel_url;
     } else {
         throw new Exception("gochannel_url not config");
     }
     $this->postParams = array("app_id" => $config->gochannel_app_id, "app_secret" => $config->gochannel_app_secret);
 }
示例#2
0
文件: Room.php 项目: ManiacMike/dixit
 public function indexAction()
 {
     $roomId = trim($_GET['room_id']);
     if (!$roomId) {
         $this->errorPage();
     }
     $roomModel = new RoomModel();
     $roomInfo = $roomModel->getRoomById($roomId);
     if (!$roomInfo) {
         $this->errorPage();
     }
     $userlist = json_decode($roomInfo['user_list'], true);
     $userlist = $userlist ? $userlist : array();
     $this->view->isJoined = in_array($this->uid, $userlist);
     $roomInfo['user_list'] = $userlist;
     $this->view->room = $roomInfo;
     $this->view->pageName = "room";
     $config = Kiss_Registry::get("config");
     $this->view->wsHost = $config->gochannel_url;
     $this->render('room/index');
 }
示例#3
0
 public function __construct()
 {
     $config = Kiss_Registry::get("config");
     $this->config = $config;
 }