Zend Framework  3.0
Public Member Functions | Protected Member Functions | List of all members
ZendServerShm Class Reference

Public Member Functions

 __construct ($options=[])
 Constructor.
 
 flush ()
 Flush the whole storage.
 
 clearByNamespace ($namespace)
 Remove items of given namespace.
 
 getTotalSpace ()
 Get total space in bytes.
 

Protected Member Functions

 zdcStore ($internalKey, $value, $ttl)
 Store data into Zend Data SHM Cache.
 
 zdcFetch ($internalKey)
 Fetch a single item from Zend Data SHM Cache.
 
 zdcFetchMulti (array $internalKeys)
 Fetch multiple items from Zend Data SHM Cache.
 
 zdcDelete ($internalKey)
 Delete data from Zend Data SHM Cache.
 
- Protected Member Functions inherited from AbstractZendServer
 internalGetItem (&$normalizedKey, &$success=null, &$casToken=null)
 Internal method to get an item.
 
 internalGetItems (array &$normalizedKeys)
 Internal method to get multiple items.
 
 internalHasItem (&$normalizedKey)
 Internal method to test if an item exists.
 
 internalHasItems (array &$normalizedKeys)
 Internal method to test multiple items.
 
 internalGetMetadatas (array &$normalizedKeys)
 Get metadata for multiple items.
 
 internalSetItem (&$normalizedKey, &$value)
 Internal method to store an item.
 
 internalRemoveItem (&$normalizedKey)
 Internal method to remove an item.
 
 internalGetCapabilities ()
 Internal method to get capabilities of this adapter.
 
 zdcStore ($internalKey, $value, $ttl)
 Store data into Zend Data Cache (zdc)
 
 zdcFetch ($internalKey)
 Fetch a single item from Zend Data Cache (zdc)
 
 zdcFetchMulti (array $internalKeys)
 Fetch multiple items from Zend Data Cache (zdc)
 
 zdcDelete ($internalKey)
 Delete data from Zend Data Cache (zdc)
 
- Protected Member Functions inherited from AbstractAdapter
 triggerPre ($eventName, ArrayObject $args)
 Trigger a pre event and return the event response collection.
 
 triggerPost ($eventName, ArrayObject $args, &$result)
 Triggers the PostEvent and return the result value.
 
 triggerException ($eventName, ArrayObject $args, &$result,\Exception $exception)
 Trigger an exception event.
 
 internalGetItem (&$normalizedKey, &$success=null, &$casToken=null)
 Internal method to get an item.
 
 internalGetItems (array &$normalizedKeys)
 Internal method to get multiple items.
 
 internalHasItem (&$normalizedKey)
 Internal method to test if an item exists.
 
 internalHasItems (array &$normalizedKeys)
 Internal method to test multiple items.
 
 internalGetMetadata (&$normalizedKey)
 Internal method to get metadata of an item.
 
 internalGetMetadatas (array &$normalizedKeys)
 Internal method to get multiple metadata.
 
 internalSetItem (&$normalizedKey, &$value)
 Internal method to store an item.
 
 internalSetItems (array &$normalizedKeyValuePairs)
 Internal method to store multiple items.
 
 internalAddItem (&$normalizedKey, &$value)
 Internal method to add an item.
 
 internalAddItems (array &$normalizedKeyValuePairs)
 Internal method to add multiple items.
 
 internalReplaceItem (&$normalizedKey, &$value)
 Internal method to replace an existing item.
 
 internalReplaceItems (array &$normalizedKeyValuePairs)
 Internal method to replace multiple existing items.
 
 internalCheckAndSetItem (&$token, &$normalizedKey, &$value)
 Internal method to set an item only if token matches.
 
 internalTouchItem (&$normalizedKey)
 Internal method to reset lifetime of an item.
 
 internalTouchItems (array &$normalizedKeys)
 Internal method to reset lifetime of multiple items.
 
 internalRemoveItem (&$normalizedKey)
 Internal method to remove an item.
 
 internalRemoveItems (array &$normalizedKeys)
 Internal method to remove multiple items.
 
 internalIncrementItem (&$normalizedKey, &$value)
 Internal method to increment an item.
 
 internalIncrementItems (array &$normalizedKeyValuePairs)
 Internal method to increment multiple items.
 
 internalDecrementItem (&$normalizedKey, &$value)
 Internal method to decrement an item.
 
 internalDecrementItems (array &$normalizedKeyValuePairs)
 Internal method to decrement multiple items.
 
 internalGetCapabilities ()
 Internal method to get capabilities of this adapter.
 
 normalizeKey (&$key)
 Validates and normalizes a key.
 
 normalizeKeys (array &$keys)
 Validates and normalizes multiple keys.
 
 normalizeKeyValuePairs (array &$keyValuePairs)
 Validates and normalizes an array of key-value pairs.
 

Additional Inherited Members

- Public Attributes inherited from AbstractZendServer
const NAMESPACE_SEPARATOR = '::'
 
- Protected Attributes inherited from AbstractAdapter
 $events = null
 
 $eventHandles = []
 
 $pluginRegistry
 
 $capabilities = null
 
 $capabilityMarker
 
 $options
 

Constructor & Destructor Documentation

__construct (   $options = [])

Constructor.

Parameters
null | array | \Traversable | AdapterOptions$options
Exceptions
Exception\ExtensionNotLoadedException

Member Function Documentation

clearByNamespace (   $namespace)

Remove items of given namespace.

Parameters
string$namespace
Returns
bool

Implements ClearByNamespaceInterface.

flush ( )

Flush the whole storage.

Returns
bool

Implements FlushableInterface.

getTotalSpace ( )

Get total space in bytes.

Returns
int

Implements TotalSpaceCapableInterface.

zdcDelete (   $internalKey)
protected

Delete data from Zend Data SHM Cache.

Parameters
string$internalKey
Returns
bool
Exceptions
Exception\RuntimeException
zdcFetch (   $internalKey)
protected

Fetch a single item from Zend Data SHM Cache.

Parameters
string$internalKey
Returns
mixed The stored value or FALSE if item wasn't found
Exceptions
Exception\RuntimeException
zdcFetchMulti ( array  $internalKeys)
protected

Fetch multiple items from Zend Data SHM Cache.

Parameters
array$internalKeys
Returns
array All found items
Exceptions
Exception\RuntimeException
zdcStore (   $internalKey,
  $value,
  $ttl 
)
protected

Store data into Zend Data SHM Cache.

Parameters
string$internalKey
mixed$value
int$ttl
Returns
void
Exceptions
Exception\RuntimeException