XOOPS RMCommon Utilities  2.1.8.91RC
 All Classes Namespaces Files Functions Variables
Swift_KeyCache_ArrayKeyCache Class Reference
Inheritance diagram for Swift_KeyCache_ArrayKeyCache:
Inheritance graph

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
 

Detailed Description

Definition at line 23 of file ArrayKeyCache.php.

Constructor & Destructor Documentation

Swift_KeyCache_ArrayKeyCache::__construct ( Swift_KeyCache_KeyCacheInputStream  $stream)

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

Parameters
Swift_KeyCache_KeyCacheInputStream$stream

Definition at line 45 of file ArrayKeyCache.php.

Member Function Documentation

Swift_KeyCache_ArrayKeyCache::_prepareCache (   $nsKey)
private

Initialize the namespace of $nsKey if needed.

Parameters
string$nsKeyprivate

Definition at line 201 of file ArrayKeyCache.php.

Referenced by exportToByteStream(), getString(), hasKey(), importFromByteStream(), and setString().

Here is the caller graph for this function:

Swift_KeyCache_ArrayKeyCache::clearAll (   $nsKey)

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

Parameters
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.

Parameters
string$nsKey
string$itemKey

Implements Swift_KeyCache.

Definition at line 180 of file ArrayKeyCache.php.

Referenced by importFromByteStream().

Here is the caller graph for this function:

Swift_KeyCache_ArrayKeyCache::exportToByteStream (   $nsKey,
  $itemKey,
Swift_InputByteStream  $is 
)

Get data back out of the cache as a ByteStream.

Parameters
string$nsKey
string$itemKey
Swift_InputByteStream$isto write the data to

Implements Swift_KeyCache.

Definition at line 157 of file ArrayKeyCache.php.

References _prepareCache(), getString(), and Swift_InputByteStream\write().

Here is the call graph for this function:

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.

Parameters
string$nsKey
string$itemKey
Returns
Swift_InputByteStream

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.

Parameters
string$nsKey
string$itemKey
Returns
string

Implements Swift_KeyCache.

Definition at line 142 of file ArrayKeyCache.php.

References _prepareCache(), and hasKey().

Referenced by exportToByteStream().

Here is the call graph for this function:

Here is the caller graph for this function:

Swift_KeyCache_ArrayKeyCache::hasKey (   $nsKey,
  $itemKey 
)

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

Parameters
string$nsKey
string$itemKey
Returns
boolean

Implements Swift_KeyCache.

Definition at line 169 of file ArrayKeyCache.php.

References _prepareCache().

Referenced by getString(), importFromByteStream(), and setString().

Here is the call graph for this function:

Here is the caller graph for this function:

Swift_KeyCache_ArrayKeyCache::importFromByteStream (   $nsKey,
  $itemKey,
Swift_OutputByteStream  $os,
  $mode 
)

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

Parameters
string$nsKey
string$itemKey
Swift_OutputByteStream$os
int$mode
See Also
MODE_WRITE, MODE_APPEND

Implements Swift_KeyCache.

Definition at line 89 of file ArrayKeyCache.php.

References _prepareCache(), clearKey(), hasKey(), and Swift_OutputByteStream\read().

Here is the call graph for this function:

Swift_KeyCache_ArrayKeyCache::setString (   $nsKey,
  $itemKey,
  $string,
  $mode 
)

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

Parameters
string$nsKey
string$itemKey
string$string
int$mode
See Also
MODE_WRITE, MODE_APPEND

Implements Swift_KeyCache.

Definition at line 58 of file ArrayKeyCache.php.

References _prepareCache(), and hasKey().

Here is the call graph for this function:

Member Data Documentation

Swift_KeyCache_ArrayKeyCache::$_contents = array()
private

Definition at line 31 of file ArrayKeyCache.php.

Swift_KeyCache_ArrayKeyCache::$_stream
private

Definition at line 38 of file ArrayKeyCache.php.

Referenced by getInputByteStream().


The documentation for this class was generated from the following file: