Пример #1
0
 protected function __construct()
 {
     if (isset($_COOKIE['MOVIM_SESSION_ID'])) {
         self::$_sessionid = $_COOKIE['MOVIM_SESSION_ID'];
     } elseif (SESSION_ID) {
         self::$_sessionid = SESSION_ID;
     } elseif (!headers_sent()) {
         $key = generateKey(32);
         setcookie("MOVIM_SESSION_ID", $key, time() + $this->_max_age, '/', false, APP_SECURED);
         self::$_sessionid = $key;
     }
 }