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

Public Member Functions

 clearAll ($nsKey)
 
 clearKey ($nsKey, $itemKey)
 
 exportToByteStream ($nsKey, $itemKey, Swift_InputByteStream $is)
 
 getInputByteStream ($nsKey, $itemKey, Swift_InputByteStream $is=null)
 
 getString ($nsKey, $itemKey)
 
 hasKey ($nsKey, $itemKey)
 
 importFromByteStream ($nsKey, $itemKey, Swift_OutputByteStream $os, $mode)
 
 setString ($nsKey, $itemKey, $string, $mode)
 

Public Attributes

const MODE_APPEND = 2
 
const MODE_WRITE = 1
 

Detailed Description

Definition at line 20 of file KeyCache.php.

Member Function Documentation

Swift_KeyCache::clearAll (   $nsKey)

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

Parameters
string$nsKey

Implemented in Swift_KeyCache_DiskKeyCache, Swift_KeyCache_ArrayKeyCache, and Swift_KeyCache_NullKeyCache.

Swift_KeyCache::clearKey (   $nsKey,
  $itemKey 
)

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

Parameters
string$nsKey
string$itemKey

Implemented in Swift_KeyCache_DiskKeyCache, Swift_KeyCache_ArrayKeyCache, and Swift_KeyCache_NullKeyCache.

Swift_KeyCache::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

Implemented in Swift_KeyCache_DiskKeyCache, Swift_KeyCache_ArrayKeyCache, and Swift_KeyCache_NullKeyCache.

Swift_KeyCache::getInputByteStream (   $nsKey,
  $itemKey,
Swift_InputByteStream  $is = null 
)

Provides a ByteStream which when written to, writes data to $itemKey. NOTE: The stream will always write in append mode. If the optional third parameter is passed all writes will go through $is.

Parameters
string$nsKey
string$itemKey
Swift_InputByteStream$is,optional
Returns
Swift_InputByteStream

Implemented in Swift_KeyCache_DiskKeyCache, Swift_KeyCache_ArrayKeyCache, and Swift_KeyCache_NullKeyCache.

Swift_KeyCache::getString (   $nsKey,
  $itemKey 
)

Get data back out of the cache as a string.

Parameters
string$nsKey
string$itemKey
Returns
string

Implemented in Swift_KeyCache_DiskKeyCache, Swift_KeyCache_ArrayKeyCache, and Swift_KeyCache_NullKeyCache.

Swift_KeyCache::hasKey (   $nsKey,
  $itemKey 
)

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

Parameters
string$nsKey
string$itemKey
Returns
boolean

Implemented in Swift_KeyCache_DiskKeyCache, Swift_KeyCache_ArrayKeyCache, and Swift_KeyCache_NullKeyCache.

Swift_KeyCache::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

Implemented in Swift_KeyCache_DiskKeyCache, Swift_KeyCache_ArrayKeyCache, and Swift_KeyCache_NullKeyCache.

Swift_KeyCache::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

Implemented in Swift_KeyCache_DiskKeyCache, Swift_KeyCache_ArrayKeyCache, and Swift_KeyCache_NullKeyCache.

Member Data Documentation

const Swift_KeyCache::MODE_APPEND = 2

Mode for appending data to the end of existing cached data

Definition at line 27 of file KeyCache.php.

Referenced by Swift_KeyCache_SimpleKeyCacheInputStream\write().

const Swift_KeyCache::MODE_WRITE = 1

Mode for replacing existing cached data

Definition at line 24 of file KeyCache.php.

Referenced by Swift_Mime_SimpleMimeEntity\toString().


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