PHP 클래스 ElggFileCache, Elgg

상속: extends ElggCache
파일 보기 프로젝트 열기: elgg/elgg 1 사용 예제들

공개 메소드들

메소드 설명
__construct ( string $cache_path, integer $max_age, integer $max_size ) Set the Elgg cache.
__destruct ( ) Preform cleanup and invalidates cache upon object destruction
clear ( ) : void Delete all files in the directory of this file cache
delete ( string $key ) : boolean Invalidate a given key.
load ( string $key, integer $offset, integer $limit = null ) : string Load a key
save ( string $key, string $data ) : boolean Save a key

보호된 메소드들

메소드 설명
createFile ( string $filename, string $rw = "rb" ) : mixed Create and return a handle to a file.
sanitizeFilename ( string $key ) : string Create a sanitised filename for the file.

메소드 상세

__construct() 공개 메소드

Set the Elgg cache.
public __construct ( string $cache_path, integer $max_age, integer $max_size )
$cache_path string The cache path.
$max_age integer Maximum age in seconds, 0 if no limit.
$max_size integer Maximum size of cache in seconds, 0 if no limit.

__destruct() 공개 메소드

Preform cleanup and invalidates cache upon object destruction
public __destruct ( )

clear() 공개 메소드

Delete all files in the directory of this file cache
public clear ( ) : void
리턴 void

createFile() 보호된 메소드

Create and return a handle to a file.
protected createFile ( string $filename, string $rw = "rb" ) : mixed
$filename string Filename to save as
$rw string Write mode
리턴 mixed

delete() 공개 메소드

Invalidate a given key.
public delete ( string $key ) : boolean
$key string Name
리턴 boolean

load() 공개 메소드

Load a key
public load ( string $key, integer $offset, integer $limit = null ) : string
$key string Name
$offset integer Offset
$limit integer Limit
리턴 string

sanitizeFilename() 보호된 메소드

Create a sanitised filename for the file.
protected sanitizeFilename ( string $key ) : string
$key string The filename
리턴 string

save() 공개 메소드

Save a key
public save ( string $key, string $data ) : boolean
$key string Name
$data string Value
리턴 boolean