PHP Class Think\Session\Driver\Redis

Inheritance: extends SessionHandle\SessionHandler
Mostra file Open project: top-think/framework Class Usage Examples

Protected Properties

Property Type Description
$config
$handler Redis

Public Methods

Method Description
__construct ( $config = [] )
close ( ) 关闭Session
destroy ( string $sessID ) : boolean | void 删除Session
gc ( string $sessMaxLifeTime ) : boolean Session 垃圾回收
open ( string $savePath, mixed $sessName ) : boolean 打开Session
read ( string $sessID ) : boolean | string 读取Session
write ( string $sessID, String $sessData ) : boolean 写入Session

Method Details

__construct() public method

public __construct ( $config = [] )

close() public method

关闭Session
public close ( )

destroy() public method

删除Session
public destroy ( string $sessID ) : boolean | void
$sessID string
return boolean | void

gc() public method

Session 垃圾回收
public gc ( string $sessMaxLifeTime ) : boolean
$sessMaxLifeTime string
return boolean

open() public method

打开Session
public open ( string $savePath, mixed $sessName ) : boolean
$savePath string
$sessName mixed
return boolean

read() public method

读取Session
public read ( string $sessID ) : boolean | string
$sessID string
return boolean | string

write() public method

写入Session
public write ( string $sessID, String $sessData ) : boolean
$sessID string
$sessData String
return boolean

Property Details

$config protected_oe property

protected $config

$handler protected_oe property

protected Redis,Think\Session\Driver $handler
return Redis