Class Session

Description

Session管理类

Located in /Think/Util/Session.class.php (line 28)

Base
   |
   --Session
Method Summary
static void clear ()
static void clearLocal ()
static void destroy ()
static void detectID ()
static boolean get (string $name)
static string getFilename ()
static boolean getLocal (string $name)
static void id ([string $id = null])
static boolean isExpired ()
static void isIdle ()
static boolean isNew (boolean $useCookies)
static boolean is_set (string $name)
static boolean is_setLocal (string $name)
static string localName ([string $name = null])
static string name ([string $name = null])
static string path ([string $path = null])
static void pause ()
static void sessionValidThru ()
static boolean set (string $name, mixed $value)
static boolean setCallback ([string $callback = null])
static string setCookieDomain ([string $sessionDomain = null])
static void setExpire (integer $time, [boolean $add = false])
static string setGcMaxLifetime ([ $gcMaxLifetime = null], string $gc_maxlifetime)
static string setGcProbability ([ $gcProbability = null], string $gc_maxlifetime)
static void setIdle (integer $time, [boolean $add = false])
static boolean setLocal (string $name, mixed $value)
static void start ()
static void updateIdle ()
static boolean useCookies ([boolean $useCookies = null])
static string useTransSID ([string $useTransSID = null])
Methods
static clear (line 93)

清空Session

  • access: public
static void clear ()
static clearLocal (line 77)

清空Session

  • access: public
static void clearLocal ()
static destroy (line 109)

销毁Session

  • access: public
static void destroy ()
static detectID (line 125)

检测SessionID

  • access: public
static void detectID ()
static get (line 414)

取得当前项目的Session 值

返回之前设置

  • access: public
static boolean get (string $name)
  • string $name
static getFilename (line 654)

当前Session文件名

  • access: public
static string getFilename ()
static getLocal (line 392)

取得当前项目的Session 值

返回之前设置

  • access: public
static boolean getLocal (string $name)
  • string $name
static id (line 171)

设置或者获取当前SessionID

  • return: 返回之前的sessionID
  • access: public
static void id ([string $id = null])
  • string $id: sessionID
static isExpired (line 272)

检查Session 是否过期

  • access: public
static boolean isExpired ()
static isIdle (line 291)

检查Session 是否闲置

  • access: public
static void isIdle ()
static isNew (line 372)

检查Session 是否新建

  • access: public
static boolean isNew (boolean $useCookies)
  • boolean $useCookies: 是否使用cookie
static is_set (line 505)

检查Session 值是否已经设置

  • access: public
static boolean is_set (string $name)
  • string $name
static is_setLocal (line 487)

检查Session 值是否已经设置

  • access: public
static boolean is_setLocal (string $name)
  • string $name
static localName (line 522)

设置或者获取 Session localname

  • access: public
static string localName ([string $name = null])
  • string $name
static name (line 154)

设置或者获取当前Session name

  • return: 返回之前的Session name
  • access: public
static string name ([string $name = null])
  • string $name: session名称
static path (line 187)

设置或者获取当前Session保存路径

  • access: public
static string path ([string $path = null])
  • string $path: 保存路径名
static pause (line 62)

暂停Session

  • access: public
static void pause ()
static sessionValidThru (line 253)

取得Session 有效时间

  • access: public
static void sessionValidThru ()
static set (line 465)

设置当前项目的Session 值

返回之前设置

  • access: public
static boolean set (string $name, mixed $value)
  • string $name
  • mixed $value
static setCallback (line 328)

设置Session 对象反序列化时候的回调函数

返回之前设置

  • access: public
static boolean setCallback ([string $callback = null])
  • string $callback: 回调函数方法名
static setCookieDomain (line 591)

设置Session cookie_domain

返回之前设置

  • access: public
static string setCookieDomain ([string $sessionDomain = null])
  • string $sessionDomain
static setExpire (line 205)

设置Session 过期时间

  • access: public
static void setExpire (integer $time, [boolean $add = false])
  • integer $time: 过期时间
  • boolean $add: 是否为增加时间
static setGcMaxLifetime (line 614)

设置Session gc_maxlifetime值

返回之前设置

  • access: public
static string setGcMaxLifetime ([ $gcMaxLifetime = null], string $gc_maxlifetime)
  • string $gc_maxlifetime
  • $gcMaxLifetime
static setGcProbability (line 636)

设置Session gc_probability 值

返回之前设置

  • access: public
static string setGcProbability ([ $gcProbability = null], string $gc_maxlifetime)
  • string $gc_maxlifetime
  • $gcProbability
static setIdle (line 234)

设置Session 闲置时间

  • access: public
static void setIdle (integer $time, [boolean $add = false])
  • integer $time: 闲置时间
  • boolean $add: 是否为增加时间
static setLocal (line 437)

设置当前项目的Session 值

返回之前设置

  • access: public
static boolean setLocal (string $name, mixed $value)
  • string $name
  • mixed $value
static start (line 41)

启动Session

  • access: public
static void start ()
static updateIdle (line 310)

更新Session 闲置时间

  • access: public
static void updateIdle ()
static useCookies (line 351)

设置Session 是否使用cookie

返回之前设置

  • access: public
static boolean useCookies ([boolean $useCookies = null])
  • boolean $useCookies: 是否使用cookie
static useTransSID (line 569)

设置Session use_trans_sid

返回之前设置

  • access: public
static string useTransSID ([string $useTransSID = null])
  • string $useTransSID

Documentation generated on Thu, 27 Mar 2008 08:20:52 +0000 by 塞北的雪