Beispiel #1
0
 /**
  * @return array array(deviceid,userid)
  */
 protected function initSession()
 {
     error_log('initSession called');
     $rpc = $this->getRpcDefault('SessionStorage');
     if ($rpc == null) {
         error_log('sessionStorage direct');
         \Lib\Services\SessionStorage::setStorageIni('session', 2);
     } else {
         error_log('sessionStorage by rpc');
     }
     \Sooh\Base\Session\Data::getInstance(\Lib\Services\SessionStorage::getInstance($rpc));
     $deviceId = \Sooh\Base\Session\Data::getSessId();
     $uid = \Sooh\Base\Session\Data::getInstance()->get('accountId');
     return array($deviceId, $uid);
 }
Beispiel #2
0
 public function indexAction()
 {
     \Lib\Services\SessionStorage::setStorageIni();
     \Sooh\Base\Session\Data::getInstance(\Lib\Services\SessionStorage::getInstance($this->getRpcDefault('SessionStorage')));
     \Sooh\Base\Ini::getInstance()->viewRenderType('json');
     $this->_view->assign('normal', true);
     $this->_view->assign('sessionId', \Sooh\Base\Session\Data::getSessId());
     $this->_view->assign('accountId', \Sooh\Base\Session\Data::getInstance()->get('accountId'));
     $today = \Sooh\Base\Time::getInstance()->YmdFull;
     $uri0 = 'http://' . $_SERVER['SERVER_NAME'] . ':' . $_SERVER['SERVER_PORT'] . '' . $_SERVER["SCRIPT_NAME"];
     $this->_view->assign('urls', array('login' => $uri0 . '?__=passport/login&loginname=qq01&passwd=123456', 'register' => $uri0 . '?__=passport/register&loginname=qq01&passwd=123456&contractId=34562342523534', 'checkin-checkin' => $uri0 . '?__=checkin/checkin&with_bonus=1', 'checkin-today' => $uri0 . '?__=checkin/today&with_bonus=1', 'checkin-reset' => $uri0 . '?__=checkin/resetday&ymd=' . $today, 'checkin-resetAll' => $uri0 . '?__=checkin/resetday&ymd=' . $today . '&num=0'));
     //$this->_view->assign('code1',\Lib\Subdir\Abc::run());
     throw new \ErrorException('msg append by exception');
     //$this->_view->assign('code2',  \Subdir\Test::run());
     //$this->_view->assign('code3',\Subdir_Type1::run());
 }