XOOPS RMCommon Utilities
2.1.8.91RC
|
Public Member Functions | |
__construct (Swift_KeyCache_KeyCacheInputStream $stream) | |
clearAll ($nsKey) | |
clearKey ($nsKey, $itemKey) | |
exportToByteStream ($nsKey, $itemKey, Swift_InputByteStream $is) | |
getInputByteStream ($nsKey, $itemKey, Swift_InputByteStream $writeThrough=null) | |
getString ($nsKey, $itemKey) | |
hasKey ($nsKey, $itemKey) | |
importFromByteStream ($nsKey, $itemKey, Swift_OutputByteStream $os, $mode) | |
setString ($nsKey, $itemKey, $string, $mode) | |
Private Member Functions | |
_prepareCache ($nsKey) | |
Private Attributes | |
$_contents = array() | |
$_stream | |
Additional Inherited Members | |
Public Attributes inherited from Swift_KeyCache | |
const | MODE_APPEND = 2 |
const | MODE_WRITE = 1 |
Definition at line 23 of file ArrayKeyCache.php.
Swift_KeyCache_ArrayKeyCache::__construct | ( | Swift_KeyCache_KeyCacheInputStream | $stream | ) |
Create a new ArrayKeyCache with the given $stream for cloning to make InputByteStreams.
Swift_KeyCache_KeyCacheInputStream | $stream |
Definition at line 45 of file ArrayKeyCache.php.
|
private |
Initialize the namespace of $nsKey if needed.
string | $nsKey | private |
Definition at line 201 of file ArrayKeyCache.php.
Referenced by exportToByteStream(), getString(), hasKey(), importFromByteStream(), and setString().
Swift_KeyCache_ArrayKeyCache::clearAll | ( | $nsKey | ) |
Clear all data in the namespace $nsKey if it exists.
string | $nsKey |
Implements Swift_KeyCache.
Definition at line 189 of file ArrayKeyCache.php.
Swift_KeyCache_ArrayKeyCache::clearKey | ( | $nsKey, | |
$itemKey | |||
) |
Clear data for $itemKey in the namespace $nsKey if it exists.
string | $nsKey | |
string | $itemKey |
Implements Swift_KeyCache.
Definition at line 180 of file ArrayKeyCache.php.
Referenced by importFromByteStream().
Swift_KeyCache_ArrayKeyCache::exportToByteStream | ( | $nsKey, | |
$itemKey, | |||
Swift_InputByteStream | $is | ||
) |
Get data back out of the cache as a ByteStream.
string | $nsKey | |
string | $itemKey | |
Swift_InputByteStream | $is | to write the data to |
Implements Swift_KeyCache.
Definition at line 157 of file ArrayKeyCache.php.
References _prepareCache(), getString(), and Swift_InputByteStream\write().
Swift_KeyCache_ArrayKeyCache::getInputByteStream | ( | $nsKey, | |
$itemKey, | |||
Swift_InputByteStream | $writeThrough = null |
||
) |
Provides a ByteStream which when written to, writes data to $itemKey. NOTE: The stream will always write in append mode.
string | $nsKey | |
string | $itemKey |
Implements Swift_KeyCache.
Definition at line 122 of file ArrayKeyCache.php.
References $_stream.
Swift_KeyCache_ArrayKeyCache::getString | ( | $nsKey, | |
$itemKey | |||
) |
Get data back out of the cache as a string.
string | $nsKey | |
string | $itemKey |
Implements Swift_KeyCache.
Definition at line 142 of file ArrayKeyCache.php.
References _prepareCache(), and hasKey().
Referenced by exportToByteStream().
Swift_KeyCache_ArrayKeyCache::hasKey | ( | $nsKey, | |
$itemKey | |||
) |
Check if the given $itemKey exists in the namespace $nsKey.
string | $nsKey | |
string | $itemKey |
Implements Swift_KeyCache.
Definition at line 169 of file ArrayKeyCache.php.
References _prepareCache().
Referenced by getString(), importFromByteStream(), and setString().
Swift_KeyCache_ArrayKeyCache::importFromByteStream | ( | $nsKey, | |
$itemKey, | |||
Swift_OutputByteStream | $os, | ||
$mode | |||
) |
Set a ByteStream into the cache under $itemKey for the namespace $nsKey.
string | $nsKey | |
string | $itemKey | |
Swift_OutputByteStream | $os | |
int | $mode |
Implements Swift_KeyCache.
Definition at line 89 of file ArrayKeyCache.php.
References _prepareCache(), clearKey(), hasKey(), and Swift_OutputByteStream\read().
Swift_KeyCache_ArrayKeyCache::setString | ( | $nsKey, | |
$itemKey, | |||
$string, | |||
$mode | |||
) |
Set a string into the cache under $itemKey for the namespace $nsKey.
string | $nsKey | |
string | $itemKey | |
string | $string | |
int | $mode |
Implements Swift_KeyCache.
Definition at line 58 of file ArrayKeyCache.php.
References _prepareCache(), and hasKey().
|
private |
Definition at line 31 of file ArrayKeyCache.php.
|
private |
Definition at line 38 of file ArrayKeyCache.php.
Referenced by getInputByteStream().