PHP 클래스 FileStore, thinksns

저자: walkor ([email protected])
파일 보기 프로젝트 열기: medz/thinksns-4 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$dataCache 为了避免频繁读取磁盘,增加了缓存机制
$dataFileHandle 打开文件的句柄
$lastCacheTime 上次缓存时间

공개 메소드들

메소드 설명
__construct ( 配置名 $config_name ) 构造函数
delete ( string $key ) : number 删除
destroy ( ) 清零销毁存储数据
get ( string $key, boolean $use_cache = true ) : Ambigous 读取
increment ( string $key ) : boolean | multitype: 自增
set ( string $key, mixed $value, integer $ttl ) : number 设置

메소드 상세

__construct() 공개 메소드

构造函数
public __construct ( 配置名 $config_name )
$config_name 配置名

delete() 공개 메소드

删除
public delete ( string $key ) : number
$key string
리턴 number

destroy() 공개 메소드

清零销毁存储数据
public destroy ( )

get() 공개 메소드

读取
public get ( string $key, boolean $use_cache = true ) : Ambigous
$key string
$use_cache boolean
리턴 Ambigous

increment() 공개 메소드

自增
public increment ( string $key ) : boolean | multitype:
$key string
리턴 boolean | multitype:

set() 공개 메소드

设置
public set ( string $key, mixed $value, integer $ttl ) : number
$key string
$value mixed
$ttl integer
리턴 number

프로퍼티 상세

$dataCache 보호되어 있는 프로퍼티

为了避免频繁读取磁盘,增加了缓存机制
protected $dataCache

$dataFileHandle 보호되어 있는 프로퍼티

打开文件的句柄
protected $dataFileHandle

$lastCacheTime 보호되어 있는 프로퍼티

上次缓存时间
protected $lastCacheTime