public function preDispatch(MvcEvent $event) { $sessionManager = new SessionManager(); $existedSessionId = $this->getSessionIfFromRequest($event->getRequest()); if ($existedSessionId) { $sessionManager->setId($existedSessionId); } AuthenticationManager::getInstance()->setSessionManager($sessionManager); }
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; } }