Пример #1
0
 public function preDispatch(MvcEvent $event)
 {
     $sessionManager = new SessionManager();
     $existedSessionId = $this->getSessionIfFromRequest($event->getRequest());
     if ($existedSessionId) {
         $sessionManager->setId($existedSessionId);
     }
     AuthenticationManager::getInstance()->setSessionManager($sessionManager);
 }
Пример #2
0
 public function init($sid = '')
 {
     try {
         if ($sid != '') {
             parent::setId($sid);
         }
         parent::start();
         $this->default = $this->container('Manager');
         if (!$this->default->timestamp) {
             $this->default->timestamp = time();
         }
     } catch (EMException $e) {
         throw $e;
     }
 }