Interface Swift_KeyCache

Implemented bySwift_KeyCache_ArrayKeyCache, Swift_KeyCache_DiskKeyCache, Swift_KeyCache_NullKeyCache

Provides a mechanism for storing data using two keys.

Public Methods

Hide inherited methods

MethodDescriptionDefined By
clearAll() Clear all data in the namespace $nsKey if it exists. Swift_KeyCache
clearKey() Clear data for $itemKey in the namespace $nsKey if it exists. Swift_KeyCache
exportToByteStream() Get data back out of the cache as a ByteStream. Swift_KeyCache
getInputByteStream() Provides a ByteStream which when written to, writes data to $itemKey. Swift_KeyCache
getString() Get data back out of the cache as a string. Swift_KeyCache
hasKey() Check if the given $itemKey exists in the namespace $nsKey. Swift_KeyCache
importFromByteStream() Set a ByteStream into the cache under $itemKey for the namespace $nsKey. Swift_KeyCache
setString() Set a string into the cache under $itemKey for the namespace $nsKey. Swift_KeyCache

Method Details

clearAll() public abstract method

Clear all data in the namespace $nsKey if it exists.

public abstract void clearAll ( $nsKey )
$nsKey string
clearKey() public abstract method

Clear data for $itemKey in the namespace $nsKey if it exists.

public abstract void clearKey ( $nsKey, $itemKey )
$nsKey string
$itemKey string
exportToByteStream() public abstract method

Get data back out of the cache as a ByteStream.

public abstract void exportToByteStream ( $nsKey, $itemKey, Swift_InputByteStream $is )
$nsKey string
$itemKey string
$is Swift_InputByteStream

Stream to write the data to

getInputByteStream() public abstract method

Provides a ByteStream which when written to, writes data to $itemKey.

NOTE: The stream will always write in append mode. If the optional third parameter is passed all writes will go through $is.

public abstract Swift_InputByteStream getInputByteStream ( $nsKey, $itemKey, Swift_InputByteStream $is null )
$nsKey string
$itemKey string
$is Swift_InputByteStream

Optional input stream

getString() public abstract method

Get data back out of the cache as a string.

public abstract string getString ( $nsKey, $itemKey )
$nsKey string
$itemKey string
hasKey() public abstract method

Check if the given $itemKey exists in the namespace $nsKey.

public abstract bool hasKey ( $nsKey, $itemKey )
$nsKey string
$itemKey string
importFromByteStream() public abstract method

Set a ByteStream into the cache under $itemKey for the namespace $nsKey.

See also [[MODE_WRITE,]] MODE_APPEND.

public abstract void importFromByteStream ( $nsKey, $itemKey, Swift_OutputByteStream $os, $mode )
$nsKey string
$itemKey string
$os Swift_OutputByteStream
$mode int
setString() public abstract method

Set a string into the cache under $itemKey for the namespace $nsKey.

See also [[MODE_WRITE,]] MODE_APPEND.

public abstract void setString ( $nsKey, $itemKey, $string, $mode )
$nsKey string
$itemKey string
$string string
$mode int