コード例 #1
0
ファイル: DooCacheSession.php プロジェクト: ENGINETEC/esquire
 /**
  * Install session managment on given $cacheSystem, with given $prefix
  *
  * @return boolean status of installtaion
  */
 public static function installOnCache(&$cacheSystem, $prefix = null)
 {
     ini_set('session.save_handler', 'user');
     self::$lifetime = ini_get('session.gc_maxlifetime');
     self::$cache = $cacheSystem;
     if (is_string($prefix)) {
         self::$sessionPrefix = $prefix;
     }
     return session_set_save_handler(array(__CLASS__, "open"), array(__CLASS__, "close"), array(__CLASS__, "read"), array(__CLASS__, "write"), array(__CLASS__, "destroy"), array(__CLASS__, "gc"));
 }