PHP 클래스 Swift_KeyCache_DiskKeyCache, Halite

저자: Chris Corbyn
상속: implements Swift_KeyCache
파일 보기 프로젝트 열기: HaliteChallenge/Halite

공개 메소드들

메소드 설명
__construct ( Swift_KeyCache_KeyCacheInputStream $stream, string $path ) Create a new DiskKeyCache with the given $stream for cloning to make InputByteStreams, and the given $path to save to.
__destruct ( ) Destructor.
clearAll ( string $nsKey ) Clear all data in the namespace $nsKey if it exists.
clearKey ( string $nsKey, string $itemKey ) Clear data for $itemKey in the namespace $nsKey if it exists.
exportToByteStream ( string $nsKey, string $itemKey, Swift_InputByteStream $is ) Get data back out of the cache as a ByteStream.
getInputByteStream ( string $nsKey, string $itemKey, Swift_InputByteStream $writeThrough = null ) : Swift_InputByteStream Provides a ByteStream which when written to, writes data to $itemKey.
getString ( string $nsKey, string $itemKey ) : string Get data back out of the cache as a string.
hasKey ( string $nsKey, string $itemKey ) : boolean Check if the given $itemKey exists in the namespace $nsKey.
importFromByteStream ( string $nsKey, string $itemKey, Swift_OutputByteStream $os, integer $mode ) Set a ByteStream into the cache under $itemKey for the namespace $nsKey.
setString ( string $nsKey, string $itemKey, string $string, integer $mode ) Set a string into the cache under $itemKey for the namespace $nsKey.

비공개 메소드들

메소드 설명
_freeHandle ( $nsKey, $itemKey )
_getHandle ( string $nsKey, string $itemKey, integer $position ) : resource Get a file handle on the cache item.
_prepareCache ( string $nsKey ) Initialize the namespace of $nsKey if needed.

메소드 상세

__construct() 공개 메소드

Create a new DiskKeyCache with the given $stream for cloning to make InputByteStreams, and the given $path to save to.
public __construct ( Swift_KeyCache_KeyCacheInputStream $stream, string $path )
$stream Swift_KeyCache_KeyCacheInputStream
$path string to save to

__destruct() 공개 메소드

Destructor.
public __destruct ( )

clearAll() 공개 메소드

Clear all data in the namespace $nsKey if it exists.
public clearAll ( string $nsKey )
$nsKey string

clearKey() 공개 메소드

Clear data for $itemKey in the namespace $nsKey if it exists.
public clearKey ( string $nsKey, string $itemKey )
$nsKey string
$itemKey string

exportToByteStream() 공개 메소드

Get data back out of the cache as a ByteStream.
public exportToByteStream ( string $nsKey, string $itemKey, Swift_InputByteStream $is )
$nsKey string
$itemKey string
$is Swift_InputByteStream to write the data to

getInputByteStream() 공개 메소드

NOTE: The stream will always write in append mode.
public getInputByteStream ( string $nsKey, string $itemKey, Swift_InputByteStream $writeThrough = null ) : Swift_InputByteStream
$nsKey string
$itemKey string
$writeThrough Swift_InputByteStream
리턴 Swift_InputByteStream

getString() 공개 메소드

Get data back out of the cache as a string.
public getString ( string $nsKey, string $itemKey ) : string
$nsKey string
$itemKey string
리턴 string

hasKey() 공개 메소드

Check if the given $itemKey exists in the namespace $nsKey.
public hasKey ( string $nsKey, string $itemKey ) : boolean
$nsKey string
$itemKey string
리턴 boolean

importFromByteStream() 공개 메소드

Set a ByteStream into the cache under $itemKey for the namespace $nsKey.
public importFromByteStream ( string $nsKey, string $itemKey, Swift_OutputByteStream $os, integer $mode )
$nsKey string
$itemKey string
$os Swift_OutputByteStream
$mode integer

setString() 공개 메소드

Set a string into the cache under $itemKey for the namespace $nsKey.
public setString ( string $nsKey, string $itemKey, string $string, integer $mode )
$nsKey string
$itemKey string
$string string
$mode integer