PHP Класс Swift_KeyCache_DiskKeyCache, Halite

Автор: Chris Corbyn
Наследование: implements Swift_KeyCache
Показать файл Открыть проект

Открытые методы

Метод Описание
__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