XOOPS RMCommon Utilities
2.1.8.91RC
|
Public Member Functions | |
__construct (Swift_KeyCache_KeyCacheInputStream $stream, $path) | |
__destruct () | |
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) | |
Public Attributes | |
const | POSITION_END = 1 |
const | POSITION_START = 0 |
Public Attributes inherited from Swift_KeyCache | |
const | MODE_APPEND = 2 |
const | MODE_WRITE = 1 |
Private Member Functions | |
_getHandle ($nsKey, $itemKey, $position) | |
_prepareCache ($nsKey) | |
Private Attributes | |
$_keys = array() | |
$_path | |
$_quotes = false | |
$_stream | |
Definition at line 24 of file DiskKeyCache.php.
Swift_KeyCache_DiskKeyCache::__construct | ( | Swift_KeyCache_KeyCacheInputStream | $stream, |
$path | |||
) |
Create a new DiskKeyCache with the given $stream for cloning to make InputByteStreams, and the given $path to save to.
Swift_KeyCache_KeyCacheInputStream | $stream | |
string | $path | to save to |
Definition at line 67 of file DiskKeyCache.php.
References $path.
Swift_KeyCache_DiskKeyCache::__destruct | ( | ) |
Destructor.
Definition at line 308 of file DiskKeyCache.php.
References clearAll().
|
private |
Get a file handle on the cache item.
string | $nsKey | |
string | $itemKey | |
int | $position |
Definition at line 287 of file DiskKeyCache.php.
Referenced by clearKey(), exportToByteStream(), getString(), importFromByteStream(), and setString().
|
private |
Initialize the namespace of $nsKey if needed.
string | $nsKey | private |
Definition at line 266 of file DiskKeyCache.php.
Referenced by getString(), importFromByteStream(), and setString().
Swift_KeyCache_DiskKeyCache::clearAll | ( | $nsKey | ) |
Clear all data in the namespace $nsKey if it exists.
string | $nsKey |
Implements Swift_KeyCache.
Definition at line 246 of file DiskKeyCache.php.
References clearKey().
Referenced by __destruct().
Swift_KeyCache_DiskKeyCache::clearKey | ( | $nsKey, | |
$itemKey | |||
) |
Clear data for $itemKey in the namespace $nsKey if it exists.
string | $nsKey | |
string | $itemKey |
Implements Swift_KeyCache.
Definition at line 231 of file DiskKeyCache.php.
References _getHandle(), and hasKey().
Referenced by clearAll().
Swift_KeyCache_DiskKeyCache::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 195 of file DiskKeyCache.php.
References _getHandle(), hasKey(), and Swift_InputByteStream\write().
Swift_KeyCache_DiskKeyCache::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 145 of file DiskKeyCache.php.
References $_stream.
Swift_KeyCache_DiskKeyCache::getString | ( | $nsKey, | |
$itemKey | |||
) |
Get data back out of the cache as a string.
string | $nsKey | |
string | $itemKey |
Swift_IoException |
Implements Swift_KeyCache.
Definition at line 166 of file DiskKeyCache.php.
References $str, _getHandle(), _prepareCache(), and hasKey().
Swift_KeyCache_DiskKeyCache::hasKey | ( | $nsKey, | |
$itemKey | |||
) |
Check if the given $itemKey exists in the namespace $nsKey.
string | $nsKey | |
string | $itemKey |
Implements Swift_KeyCache.
Definition at line 221 of file DiskKeyCache.php.
Referenced by clearKey(), exportToByteStream(), and getString().
Swift_KeyCache_DiskKeyCache::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 |
Swift_IoException |
Implements Swift_KeyCache.
Definition at line 113 of file DiskKeyCache.php.
References _getHandle(), _prepareCache(), and Swift_OutputByteStream\read().
Swift_KeyCache_DiskKeyCache::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 |
Swift_IoException |
Implements Swift_KeyCache.
Definition at line 83 of file DiskKeyCache.php.
References _getHandle(), and _prepareCache().
|
private |
Definition at line 52 of file DiskKeyCache.php.
|
private |
Definition at line 45 of file DiskKeyCache.php.
|
private |
Definition at line 59 of file DiskKeyCache.php.
|
private |
Definition at line 38 of file DiskKeyCache.php.
Referenced by getInputByteStream().
const Swift_KeyCache_DiskKeyCache::POSITION_END = 1 |
Signal to place pointer at end of file
Definition at line 31 of file DiskKeyCache.php.
const Swift_KeyCache_DiskKeyCache::POSITION_START = 0 |
Signal to place pointer at start of file
Definition at line 28 of file DiskKeyCache.php.