package Default
inherited_from \Zend\Cache\Storage\Adapter\AbstractAdapter

 Methods

Constructor

__construct(null|array|\Traversable|\Zend\Cache\Storage\Adapter\XCacheOptions $options = null
inherited_from \Zend\Cache\Storage\Adapter\AbstractAdapter::__construct()

Parameters

$options

nullarray\Traversable\Zend\Cache\Storage\Adapter\XCacheOptions

Exceptions

\Zend\Cache\Exception\ExceptionInterface

Constructor

__construct(null|array|\Traversable|\Zend\Cache\Storage\Adapter\AdapterOptions $options = null
Inherited

Parameters

$options

nullarray\Traversable\Zend\Cache\Storage\Adapter\AdapterOptions

Exceptions

\Zend\Cache\Exception\ExceptionInterface

Destructor

__destruct() : void
Inherited

detach all registered plugins to free event handles of event manager

Add an item.

addItem(string $key, mixed $value) : boolean
Inherited
triggers addItem.pre(PreEvent)
triggers addItem.post(PostEvent)
triggers addItem.exception(ExceptionEvent)
inherited_from \Zend\Cache\Storage\StorageInterface::addItem()

Parameters

$key

string

$value

mixed

Exceptions

\Zend\Cache\Exception\ExceptionInterface

Returns

boolean

Add multiple items.

addItems(array $keyValuePairs) : array
Inherited
triggers addItems.pre(PreEvent)
triggers addItems.post(PostEvent)
triggers addItems.exception(ExceptionEvent)
inherited_from \Zend\Cache\Storage\StorageInterface::addItems()

Parameters

$keyValuePairs

array

Exceptions

\Zend\Cache\Exception\ExceptionInterface

Returns

arrayArray of not stored keys

Register a plugin

addPlugin(\Zend\Cache\Storage\Plugin\PluginInterface $plugin, integer $priority = 1) : \Zend\Cache\Storage\Adapter\AbstractAdapter
Inherited

Parameters

$plugin

\Zend\Cache\Storage\Plugin\PluginInterface

$priority

integer

Exceptions

\Zend\Cache\Exception\LogicException

Returns

\Zend\Cache\Storage\Adapter\AbstractAdapterFluent interface

Set an item only if token matches

checkAndSetItem(mixed $token, string $key, mixed $value) : boolean
Inherited

It uses the token received from getItem() to check if the item has changed before overwriting it.

see
see
inherited_from \Zend\Cache\Storage\StorageInterface::checkAndSetItem()

Parameters

$token

mixed

$key

string

$value

mixed

Exceptions

\Zend\Cache\Exception\ExceptionInterface

Returns

boolean

Remove items by given namespace

clearByNamespace(string $namespace) : boolean
inherited_from \Zend\Cache\Storage\ClearByNamespaceInterface::clearByNamespace()

Parameters

$namespace

string

Returns

boolean

Remove items matching given prefix

clearByPrefix(string $prefix) : boolean
inherited_from \Zend\Cache\Storage\ClearByPrefixInterface::clearByPrefix()

Parameters

$prefix

string

Returns

boolean

Decrement an item.

decrementItem(string $key, integer $value) : integer | boolean
Inherited
triggers decrementItem.pre(PreEvent)
triggers decrementItem.post(PostEvent)
triggers decrementItem.exception(ExceptionEvent)
inherited_from \Zend\Cache\Storage\StorageInterface::decrementItem()

Parameters

$key

string

$value

integer

Exceptions

\Zend\Cache\Exception\ExceptionInterface

Returns

integerbooleanThe new value on success, false on failure

Decrement multiple items.

decrementItems(array $keyValuePairs) : array
Inherited
triggers incrementItems.pre(PreEvent)
triggers incrementItems.post(PostEvent)
triggers incrementItems.exception(ExceptionEvent)
inherited_from \Zend\Cache\Storage\StorageInterface::decrementItems()

Parameters

$keyValuePairs

array

Exceptions

\Zend\Cache\Exception\ExceptionInterface

Returns

arrayAssociative array of keys and new values

Flush the whole storage

flush() : boolean
inherited_from \Zend\Cache\Storage\FlushableInterface::flush()

Returns

boolean

Get available space in bytes

getAvailableSpace() : integer | float
inherited_from \Zend\Cache\Storage\AvailableSpaceCapableInterface::getAvailableSpace()

Returns

integerfloat

Get caching enabled.

getCaching() : boolean
Inherited

Alias of getWritable and getReadable.

see
see

Returns

boolean

Get capabilities of this adapter

getCapabilities() : \Zend\Cache\Storage\Capabilities
Inherited
triggers getCapabilities.pre(PreEvent)
triggers getCapabilities.post(PostEvent)
triggers getCapabilities.exception(ExceptionEvent)
inherited_from \Zend\Cache\Storage\StorageInterface::getCapabilities()

Returns

\Zend\Cache\Storage\Capabilities

Get the event manager

getEventManager() : \Zend\EventManager\EventManagerInterface
Inherited

Lazy-loads an EventManager instance if none registered.

inherited_from \Zend\EventManager\EventsCapableInterface::getEventManager()

Returns

\Zend\EventManager\EventManagerInterface

Get an item.

getItem(string $key, boolean $success = null, mixed $casToken = null) : mixed
Inherited
triggers getItem.pre(PreEvent)
triggers getItem.post(PostEvent)
triggers getItem.exception(ExceptionEvent)
inherited_from \Zend\Cache\Storage\StorageInterface::getItem()

Parameters

$key

string

$success

boolean

$casToken

mixed

Exceptions

\Zend\Cache\Exception\ExceptionInterface

Returns

mixedData on success, null on failure

Get multiple items.

getItems(array $keys) : array
Inherited
triggers getItems.pre(PreEvent)
triggers getItems.post(PostEvent)
triggers getItems.exception(ExceptionEvent)
inherited_from \Zend\Cache\Storage\StorageInterface::getItems()

Parameters

$keys

array

Exceptions

\Zend\Cache\Exception\ExceptionInterface

Returns

arrayAssociative array of keys and values

Get the storage iterator

getIterator() : \Zend\Cache\Storage\Adapter\KeyListIterator

Returns

\Zend\Cache\Storage\Adapter\KeyListIterator

Get multiple metadata

getMetadatas(array $keys) : array
Inherited
triggers getMetadatas.pre(PreEvent)
triggers getMetadatas.post(PostEvent)
triggers getMetadatas.exception(ExceptionEvent)
inherited_from \Zend\Cache\Storage\StorageInterface::getMetadatas()

Parameters

$keys

array

Exceptions

\Zend\Cache\Exception\ExceptionInterface

Returns

arrayAssociative array of keys and metadata

Get options.

getOptions() : \Zend\Cache\Storage\Adapter\XCacheOptions
see
inherited_from \Zend\Cache\Storage\Adapter\AbstractAdapter::getOptions()

Returns

\Zend\Cache\Storage\Adapter\XCacheOptions

Get options.

getOptions() : \Zend\Cache\Storage\Adapter\AdapterOptions
Inherited
see
inherited_from \Zend\Cache\Storage\StorageInterface::getOptions()

Returns

\Zend\Cache\Storage\Adapter\AdapterOptions

Return registry of plugins

getPluginRegistry() : \SplObjectStorage
Inherited

Returns

\SplObjectStorage

Get total space in bytes

getTotalSpace() : integer | float
inherited_from \Zend\Cache\Storage\TotalSpaceCapableInterface::getTotalSpace()

Returns

integerfloat

Test if an item exists.

hasItem(string $key) : boolean
Inherited
triggers hasItem.pre(PreEvent)
triggers hasItem.post(PostEvent)
triggers hasItem.exception(ExceptionEvent)
inherited_from \Zend\Cache\Storage\StorageInterface::hasItem()

Parameters

$key

string

Exceptions

\Zend\Cache\Exception\ExceptionInterface

Returns

boolean

Test multiple items.

hasItems(array $keys) : array
Inherited
triggers hasItems.pre(PreEvent)
triggers hasItems.post(PostEvent)
triggers hasItems.exception(ExceptionEvent)
inherited_from \Zend\Cache\Storage\StorageInterface::hasItems()

Parameters

$keys

array

Exceptions

\Zend\Cache\Exception\ExceptionInterface

Returns

arrayArray of found keys

Check if a plugin is registered

hasPlugin(\Zend\Cache\Storage\Plugin\PluginInterface $plugin) : boolean
Inherited

Parameters

$plugin

\Zend\Cache\Storage\Plugin\PluginInterface

Returns

boolean

Increment an item.

incrementItem(string $key, integer $value) : integer | boolean
Inherited
triggers incrementItem.pre(PreEvent)
triggers incrementItem.post(PostEvent)
triggers incrementItem.exception(ExceptionEvent)
inherited_from \Zend\Cache\Storage\StorageInterface::incrementItem()

Parameters

$key

string

$value

integer

Exceptions

\Zend\Cache\Exception\ExceptionInterface

Returns

integerbooleanThe new value on success, false on failure

Increment multiple items.

incrementItems(array $keyValuePairs) : array
Inherited
triggers incrementItems.pre(PreEvent)
triggers incrementItems.post(PostEvent)
triggers incrementItems.exception(ExceptionEvent)
inherited_from \Zend\Cache\Storage\StorageInterface::incrementItems()

Parameters

$keyValuePairs

array

Exceptions

\Zend\Cache\Exception\ExceptionInterface

Returns

arrayAssociative array of keys and new values

Remove an item.

removeItem(string $key) : boolean
Inherited
triggers removeItem.pre(PreEvent)
triggers removeItem.post(PostEvent)
triggers removeItem.exception(ExceptionEvent)
inherited_from \Zend\Cache\Storage\StorageInterface::removeItem()

Parameters

$key

string

Exceptions

\Zend\Cache\Exception\ExceptionInterface

Returns

boolean

Remove multiple items.

removeItems(array $keys) : array
Inherited
triggers removeItems.pre(PreEvent)
triggers removeItems.post(PostEvent)
triggers removeItems.exception(ExceptionEvent)
inherited_from \Zend\Cache\Storage\StorageInterface::removeItems()

Parameters

$keys

array

Exceptions

\Zend\Cache\Exception\ExceptionInterface

Returns

arrayArray of not removed keys

Unregister an already registered plugin

removePlugin(\Zend\Cache\Storage\Plugin\PluginInterface $plugin) : \Zend\Cache\Storage\Adapter\AbstractAdapter
Inherited

Parameters

$plugin

\Zend\Cache\Storage\Plugin\PluginInterface

Exceptions

\Zend\Cache\Exception\LogicException

Returns

\Zend\Cache\Storage\Adapter\AbstractAdapterFluent interface

Replace an existing item.

replaceItem(string $key, mixed $value) : boolean
Inherited
triggers replaceItem.pre(PreEvent)
triggers replaceItem.post(PostEvent)
triggers replaceItem.exception(ExceptionEvent)
inherited_from \Zend\Cache\Storage\StorageInterface::replaceItem()

Parameters

$key

string

$value

mixed

Exceptions

\Zend\Cache\Exception\ExceptionInterface

Returns

boolean

Replace multiple existing items.

replaceItems(array $keyValuePairs) : array
Inherited
triggers replaceItems.pre(PreEvent)
triggers replaceItems.post(PostEvent)
triggers replaceItems.exception(ExceptionEvent)
inherited_from \Zend\Cache\Storage\StorageInterface::replaceItems()

Parameters

$keyValuePairs

array

Exceptions

\Zend\Cache\Exception\ExceptionInterface

Returns

arrayArray of not stored keys

Enable/Disable caching.

setCaching(boolean $flag) : \Zend\Cache\Storage\Adapter\AbstractAdapter
Inherited

Alias of setWritable and setReadable.

see
see

Parameters

$flag

boolean

Returns

\Zend\Cache\Storage\Adapter\AbstractAdapter

Store an item.

setItem(string $key, mixed $value) : boolean
Inherited
triggers setItem.pre(PreEvent)
triggers setItem.post(PostEvent)
triggers setItem.exception(ExceptionEvent)
inherited_from \Zend\Cache\Storage\StorageInterface::setItem()

Parameters

$key

string

$value

mixed

Exceptions

\Zend\Cache\Exception\ExceptionInterface

Returns

boolean

Store multiple items.

setItems(array $keyValuePairs) : array
Inherited
triggers setItems.pre(PreEvent)
triggers setItems.post(PostEvent)
triggers setItems.exception(ExceptionEvent)
inherited_from \Zend\Cache\Storage\StorageInterface::setItems()

Parameters

$keyValuePairs

array

Exceptions

\Zend\Cache\Exception\ExceptionInterface

Returns

arrayArray of not stored keys

Set options.

setOptions(array|\Traversable|\Zend\Cache\Storage\Adapter\XCacheOptions $options) : \Zend\Cache\Storage\Adapter\XCache
see
inherited_from \Zend\Cache\Storage\Adapter\AbstractAdapter::setOptions()

Parameters

$options

array\Traversable\Zend\Cache\Storage\Adapter\XCacheOptions

Returns

\Zend\Cache\Storage\Adapter\XCache

Set options.

setOptions(array|\Traversable|\Zend\Cache\Storage\Adapter\AdapterOptions $options) : \Zend\Cache\Storage\Adapter\AbstractAdapter
Inherited
see
inherited_from \Zend\Cache\Storage\StorageInterface::setOptions()

Parameters

$options

array\Traversable\Zend\Cache\Storage\Adapter\AdapterOptions

Returns

\Zend\Cache\Storage\Adapter\AbstractAdapter

Reset lifetime of an item

touchItem(string $key) : boolean
Inherited
triggers touchItem.pre(PreEvent)
triggers touchItem.post(PostEvent)
triggers touchItem.exception(ExceptionEvent)
inherited_from \Zend\Cache\Storage\StorageInterface::touchItem()

Parameters

$key

string

Exceptions

\Zend\Cache\Exception\ExceptionInterface

Returns

boolean

Reset lifetime of multiple items.

touchItems(array $keys) : array
Inherited
triggers touchItems.pre(PreEvent)
triggers touchItems.post(PostEvent)
triggers touchItems.exception(ExceptionEvent)
inherited_from \Zend\Cache\Storage\StorageInterface::touchItems()

Parameters

$keys

array

Exceptions

\Zend\Cache\Exception\ExceptionInterface

Returns

arrayArray of not updated keys

Init authentication before calling admin functions

initAdminAuth() : void

Internal method to add an item.

internalAddItem(string $normalizedKey, mixed $value) : boolean
Inherited

Parameters

$normalizedKey

string

$value

mixed

Exceptions

\Zend\Cache\Exception\ExceptionInterface

Returns

boolean

Internal method to add multiple items.

internalAddItems(array $normalizedKeyValuePairs) : array
Inherited

Parameters

$normalizedKeyValuePairs

array

Exceptions

\Zend\Cache\Exception\ExceptionInterface

Returns

arrayArray of not stored keys

Internal method to set an item only if token matches

internalCheckAndSetItem(mixed $token, string $normalizedKey, mixed $value) : boolean
Inherited
see
see

Parameters

$token

mixed

$normalizedKey

string

$value

mixed

Exceptions

\Zend\Cache\Exception\ExceptionInterface

Returns

boolean

Internal method to decrement an item.

internalDecrementItem(string $normalizedKey, integer $value) : integer | boolean
inherited_from \Zend\Cache\Storage\Adapter\AbstractAdapter::internalDecrementItem()

Parameters

$normalizedKey

string

$value

integer

Exceptions

\Zend\Cache\Exception\ExceptionInterface

Returns

integerbooleanThe new value on success, false on failure

Internal method to decrement an item.

internalDecrementItem(string $normalizedKey, integer $value) : integer | boolean
Inherited

Parameters

$normalizedKey

string

$value

integer

Exceptions

\Zend\Cache\Exception\ExceptionInterface

Returns

integerbooleanThe new value on success, false on failure

Internal method to decrement multiple items.

internalDecrementItems(array $normalizedKeyValuePairs) : array
Inherited

Parameters

$normalizedKeyValuePairs

array

Exceptions

\Zend\Cache\Exception\ExceptionInterface

Returns

arrayAssociative array of keys and new values

Internal method to get capabilities of this adapter

internalGetCapabilities() : \Zend\Cache\Storage\Capabilities
inherited_from \Zend\Cache\Storage\Adapter\AbstractAdapter::internalGetCapabilities()

Returns

\Zend\Cache\Storage\Capabilities

Internal method to get capabilities of this adapter

internalGetCapabilities() : \Zend\Cache\Storage\Capabilities
Inherited

Returns

\Zend\Cache\Storage\Capabilities

Internal method to get an item.

internalGetItem(string $normalizedKey, boolean $success = null, mixed $casToken = null) : mixed
inherited_from \Zend\Cache\Storage\Adapter\AbstractAdapter::internalGetItem()

Parameters

$normalizedKey

string

$success

boolean

$casToken

mixed

Exceptions

\Zend\Cache\Exception\ExceptionInterface

Returns

mixedData on success, null on failure

Internal method to get an item.

internalGetItem(string $normalizedKey, boolean $success = null, mixed $casToken = null) : mixed
Inherited

Parameters

$normalizedKey

string

$success

boolean

$casToken

mixed

Exceptions

\Zend\Cache\Exception\ExceptionInterface

Returns

mixedData on success, null on failure

Internal method to get multiple items.

internalGetItems(array $normalizedKeys) : array
Inherited

Parameters

$normalizedKeys

array

Exceptions

\Zend\Cache\Exception\ExceptionInterface

Returns

arrayAssociative array of keys and values

Internal method to get multiple metadata

internalGetMetadatas(array $normalizedKeys) : array
Inherited

Parameters

$normalizedKeys

array

Exceptions

\Zend\Cache\Exception\ExceptionInterface

Returns

arrayAssociative array of keys and metadata

Internal method to test if an item exists.

internalHasItem(string $normalizedKey) : boolean
inherited_from \Zend\Cache\Storage\Adapter\AbstractAdapter::internalHasItem()

Parameters

$normalizedKey

string

Exceptions

\Zend\Cache\Exception\ExceptionInterface

Returns

boolean

Internal method to test if an item exists.

internalHasItem(string $normalizedKey) : boolean
Inherited

Parameters

$normalizedKey

string

Exceptions

\Zend\Cache\Exception\ExceptionInterface

Returns

boolean

Internal method to test multiple items.

internalHasItems(array $normalizedKeys) : array
Inherited

Parameters

$normalizedKeys

array

Exceptions

\Zend\Cache\Exception\ExceptionInterface

Returns

arrayArray of found keys

Internal method to increment an item.

internalIncrementItem(string $normalizedKey, integer $value) : integer | boolean
inherited_from \Zend\Cache\Storage\Adapter\AbstractAdapter::internalIncrementItem()

Parameters

$normalizedKey

string

$value

integer

Exceptions

\Zend\Cache\Exception\ExceptionInterface

Returns

integerbooleanThe new value on success, false on failure

Internal method to increment an item.

internalIncrementItem(string $normalizedKey, integer $value) : integer | boolean
Inherited

Parameters

$normalizedKey

string

$value

integer

Exceptions

\Zend\Cache\Exception\ExceptionInterface

Returns

integerbooleanThe new value on success, false on failure

Internal method to increment multiple items.

internalIncrementItems(array $normalizedKeyValuePairs) : array
Inherited

Parameters

$normalizedKeyValuePairs

array

Exceptions

\Zend\Cache\Exception\ExceptionInterface

Returns

arrayAssociative array of keys and new values

Internal method to remove an item.

internalRemoveItem(string $normalizedKey) : boolean
inherited_from \Zend\Cache\Storage\Adapter\AbstractAdapter::internalRemoveItem()

Parameters

$normalizedKey

string

Exceptions

\Zend\Cache\Exception\ExceptionInterface

Returns

boolean

Internal method to remove an item.

internalRemoveItem(string $normalizedKey) : boolean
Inherited

Parameters

$normalizedKey

string

Exceptions

\Zend\Cache\Exception\ExceptionInterface

Returns

boolean

Internal method to remove multiple items.

internalRemoveItems(array $normalizedKeys) : array
Inherited

Parameters

$normalizedKeys

array

Exceptions

\Zend\Cache\Exception\ExceptionInterface

Returns

arrayArray of not removed keys

Internal method to replace an existing item.

internalReplaceItem(string $normalizedKey, mixed $value) : boolean
Inherited

Parameters

$normalizedKey

string

$value

mixed

Exceptions

\Zend\Cache\Exception\ExceptionInterface

Returns

boolean

Internal method to replace multiple existing items.

internalReplaceItems(array $normalizedKeyValuePairs) : array
Inherited

Parameters

$normalizedKeyValuePairs

array

Exceptions

\Zend\Cache\Exception\ExceptionInterface

Returns

arrayArray of not stored keys

Internal method to store an item.

internalSetItem(string $normalizedKey, mixed $value) : boolean
inherited_from \Zend\Cache\Storage\Adapter\AbstractAdapter::internalSetItem()

Parameters

$normalizedKey

string

$value

mixed

Exceptions

\Zend\Cache\Exception\ExceptionInterface

Returns

boolean

Internal method to store an item.

internalSetItem(string $normalizedKey, mixed $value) : boolean
Inherited

Parameters

$normalizedKey

string

$value

mixed

Exceptions

\Zend\Cache\Exception\ExceptionInterface

Returns

boolean

Internal method to store multiple items.

internalSetItems(array $normalizedKeyValuePairs) : array
Inherited

Parameters

$normalizedKeyValuePairs

array

Exceptions

\Zend\Cache\Exception\ExceptionInterface

Returns

arrayArray of not stored keys

Internal method to reset lifetime of an item

internalTouchItem(string $normalizedKey) : boolean
Inherited

Parameters

$normalizedKey

string

Exceptions

\Zend\Cache\Exception\ExceptionInterface

Returns

boolean

Internal method to reset lifetime of multiple items.

internalTouchItems(array $normalizedKeys) : array
Inherited

Parameters

$normalizedKeys

array

Exceptions

\Zend\Cache\Exception\ExceptionInterface

Returns

arrayArray of not updated keys

Validates and normalizes a key

normalizeKey(string $key) : void
Inherited

Parameters

$key

string

Exceptions

\Zend\Cache\Exception\InvalidArgumentException On an invalid key

Validates and normalizes an array of key-value pairs

normalizeKeyValuePairs(array $keyValuePairs) : void
Inherited

Parameters

$keyValuePairs

array

Exceptions

\Zend\Cache\Exception\InvalidArgumentException On an invalid key

Validates and normalizes multiple keys

normalizeKeys(array $keys) : void
Inherited

Parameters

$keys

array

Exceptions

\Zend\Cache\Exception\InvalidArgumentException On an invalid key

Reset authentication after calling admin functions

resetAdminAuth() : void

Trigger an exception event

triggerException(string $eventName, \ArrayObject $args, mixed $result, \Exception $exception) : mixed
Inherited

If the ExceptionEvent has the flag "throwException" enabled throw the exception after trigger else return the result.

Parameters

$eventName

string

$args

\ArrayObject

$result

mixed

$exception

\Exception

Exceptions

\Zend\Cache\Exception\ExceptionInterface

Returns

mixed

Triggers the PostEvent and return the result value.

triggerPost(string $eventName, \ArrayObject $args, mixed $result) : mixed
Inherited

Parameters

$eventName

string

$args

\ArrayObject

$result

mixed

Returns

mixed

Trigger a pre event and return the event response collection

triggerPre(string $eventName, \ArrayObject $args) : \Zend\EventManager\ResponseCollection
Inherited

Parameters

$eventName

string

$args

\ArrayObject

Returns

\Zend\EventManager\ResponseCollectionAll handler return values

 Properties

 

Backup HTTP authentication properties of $_SERVER array

$backupAuth : array

Default

array()
 

Capabilities of this adapter

$capabilities : null | \Zend\Cache\Storage\Capabilities

Default

null
 

Marker to change capabilities

$capabilityMarker : null | object

Default

 

Event handles of this adapter

$eventHandles : array

Default

array()
 

The used EventManager if any

$events : null | \Zend\EventManager\EventManagerInterface

Default

null
 

options

$options : mixed

Default

 

The plugin registry

$pluginRegistry : \SplObjectStorage

Default

 

Total space in bytes

$totalSpace : integer | float

Default