Class Swift_KeyCache_ArrayKeyCache

InheritanceSwift_KeyCache_ArrayKeyCache
ImplementsSwift_KeyCache

A basic KeyCache backed by an array.

Public Methods

Hide inherited methods

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

Method Details

__construct() public method

Create a new ArrayKeyCache with the given $stream for cloning to make InputByteStreams.

public void __construct ( Swift_KeyCache_KeyCacheInputStream $stream )
$stream Swift_KeyCache_KeyCacheInputStream
clearAll() public method

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

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

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

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

Get data back out of the cache as a ByteStream.

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

To write the data to

getInputByteStream() public method

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

NOTE: The stream will always write in append mode.

public Swift_InputByteStream getInputByteStream ( $nsKey, $itemKey, Swift_InputByteStream $writeThrough null )
$nsKey string
$itemKey string
$writeThrough Swift_InputByteStream
getString() public method

Get data back out of the cache as a string.

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

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

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

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

See also [[MODE_WRITE,]] MODE_APPEND.

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

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

See also [[MODE_WRITE,]] MODE_APPEND.

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