function __construct() { /** * Object of Registry class * @var Registry $registry */ $registry = Registry::getInstance(); $this->db = DataBase::getInstance(); $this->db_config = $registry->getValue('db_config'); $this->sessionEngineObj = SessionEngine::getInstance(); }
/** * Checks if the user is authorized * @access public * @static * @return bool */ public static function getLoginStatus() { $sessionEngineObj = SessionEngine::getInstance(); $loginStatus = false; $user = $sessionEngineObj->getSessionData('user'); if ($user) { foreach ($user as $params => $values) { if (isset($values)) { $loginStatus = true; } else { $loginStatus = false; break; } } } else { $loginStatus = false; } return $loginStatus; }
/** * Returns array with information about session from the storage (usually DB) to * make comparison with client session info. * This method proxies call to the engine to achieve storage independence. * * Behavior AfterGetServerSession is defined. * * @return array */ protected function getServerSession($sid) { $ss = $this->engine->getServerSession($sid); $this->trigger("AfterGetServerSession", array(&$ss)); return $ss; }