![]() |
TYPO3
7.6
|
Public Member Functions | |
__construct (Swift_KeyCache_KeyCacheInputStream $stream, $path) | |
setString ($nsKey, $itemKey, $string, $mode) | |
importFromByteStream ($nsKey, $itemKey, Swift_OutputByteStream $os, $mode) | |
getInputByteStream ($nsKey, $itemKey, Swift_InputByteStream $writeThrough=null) | |
getString ($nsKey, $itemKey) | |
exportToByteStream ($nsKey, $itemKey, Swift_InputByteStream $is) | |
hasKey ($nsKey, $itemKey) | |
clearKey ($nsKey, $itemKey) | |
clearAll ($nsKey) | |
__destruct () | |
Public Attributes | |
const | POSITION_START = 0 |
const | POSITION_END = 1 |
const | POSITION_CURRENT = 2 |
![]() | |
const | MODE_WRITE = 1 |
const | MODE_APPEND = 2 |
Private Member Functions | |
_prepareCache ($nsKey) | |
_getHandle ($nsKey, $itemKey, $position) | |
_freeHandle ($nsKey, $itemKey) | |
Private Attributes | |
$_stream | |
$_path | |
$_keys = array() | |
$_quotes = false | |
A KeyCache which streams to and from disk.
Definition at line 16 of file DiskKeyCache.php.
__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 62 of file DiskKeyCache.php.
__destruct | ( | ) |
|
private |
Definition at line 308 of file DiskKeyCache.php.
References _getHandle().
Referenced by clearKey(), exportToByteStream(), getString(), importFromByteStream(), and setString().
|
private |
Get a file handle on the cache item.
string | $nsKey | |
string | $itemKey | |
int | $position |
Definition at line 289 of file DiskKeyCache.php.
References elseif, and hasKey().
Referenced by _freeHandle(), exportToByteStream(), getString(), importFromByteStream(), and setString().
|
private |
Initialize the namespace of $nsKey if needed.
string | $nsKey |
Definition at line 269 of file DiskKeyCache.php.
Referenced by getString(), importFromByteStream(), and setString().
clearAll | ( | $nsKey | ) |
Clear all data in the namespace $nsKey if it exists.
string | $nsKey |
Implements Swift_KeyCache.
Definition at line 251 of file DiskKeyCache.php.
References clearKey().
Referenced by __destruct().
clearKey | ( | $nsKey, | |
$itemKey | |||
) |
Clear data for $itemKey in the namespace $nsKey if it exists.
string | $nsKey | |
string | $itemKey |
Implements Swift_KeyCache.
Definition at line 238 of file DiskKeyCache.php.
References _freeHandle(), and hasKey().
Referenced by clearAll().
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 202 of file DiskKeyCache.php.
References _freeHandle(), _getHandle(), hasKey(), and Swift_InputByteStream\write().
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 | |
Swift_InputByteStream | $writeThrough |
Implements Swift_KeyCache.
Definition at line 151 of file DiskKeyCache.php.
References $_stream.
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 174 of file DiskKeyCache.php.
References _freeHandle(), _getHandle(), _prepareCache(), and hasKey().
hasKey | ( | $nsKey, | |
$itemKey | |||
) |
Check if the given $itemKey exists in the namespace $nsKey.
string | $nsKey | |
string | $itemKey |
Implements Swift_KeyCache.
Definition at line 227 of file DiskKeyCache.php.
Referenced by _getHandle(), clearKey(), exportToByteStream(), and getString().
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 117 of file DiskKeyCache.php.
References _freeHandle(), _getHandle(), _prepareCache(), and Swift_OutputByteStream\read().
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 84 of file DiskKeyCache.php.
References _freeHandle(), _getHandle(), and _prepareCache().
|
private |
Definition at line 46 of file DiskKeyCache.php.
|
private |
Definition at line 39 of file DiskKeyCache.php.
|
private |
Definition at line 53 of file DiskKeyCache.php.
|
private |
Definition at line 32 of file DiskKeyCache.php.
Referenced by getInputByteStream().
const POSITION_CURRENT = 2 |
Signal to leave pointer in whatever position it currently is
Definition at line 25 of file DiskKeyCache.php.
const POSITION_END = 1 |
Signal to place pointer at end of file
Definition at line 22 of file DiskKeyCache.php.
const POSITION_START = 0 |
Signal to place pointer at start of file
Definition at line 19 of file DiskKeyCache.php.