Fully Qualified Name: | Zend\Cache\Storage\Adapter\BlackHole |
Implements: | StorageInterface, AvailableSpaceCapableInterface, ClearByNamespaceInterface, ClearByPrefixInterface, ClearExpiredInterface, FlushableInterface, IterableInterface, OptimizableInterface, TaggableInterface, TotalSpaceCapableInterface |
Name | Description | Defined By |
---|---|---|
__construct() | Constructor | BlackHole |
addItem() | Add an item. | BlackHole |
addItems() | Add multiple items. | BlackHole |
checkAndSetItem() | Set an item only if token matches | BlackHole |
clearByNamespace() | Remove items of given namespace | BlackHole |
clearByPrefix() | Remove items matching given prefix | BlackHole |
clearByTags() | Remove items matching given tags. | BlackHole |
clearExpired() | Remove expired items | BlackHole |
decrementItem() | Decrement an item. | BlackHole |
decrementItems() | Decrement multiple items. | BlackHole |
flush() | Flush the whole storage | BlackHole |
getAvailableSpace() | Get available space in bytes | BlackHole |
getCapabilities() | Capabilities of this storage | BlackHole |
getItem() | Get an item. | BlackHole |
getItems() | Get multiple items. | BlackHole |
getIterator() | Get the storage iterator | BlackHole |
getMetadata() | Get metadata of an item. | BlackHole |
getMetadatas() | Get multiple metadata | BlackHole |
getOptions() | Get options | BlackHole |
getTags() | Get tags of an item by given key | BlackHole |
getTotalSpace() | Get total space in bytes | BlackHole |
hasItem() | Test if an item exists. | BlackHole |
hasItems() | Test multiple items. | BlackHole |
incrementItem() | Increment an item. | BlackHole |
incrementItems() | Increment multiple items. | BlackHole |
optimize() | Optimize the storage | BlackHole |
removeItem() | Remove an item. | BlackHole |
removeItems() | Remove multiple items. | BlackHole |
replaceItem() | Replace an existing item. | BlackHole |
replaceItems() | Replace multiple existing items. | BlackHole |
setItem() | Store an item. | BlackHole |
setItems() | Store multiple items. | BlackHole |
setOptions() | Set options. | BlackHole |
setTags() | Set tags to an item by given key. | BlackHole |
touchItem() | Reset lifetime of an item | BlackHole |
touchItems() | Reset lifetime of multiple items. | BlackHole |
Constructor
Parameter Name | Type | Description |
---|---|---|
$options | null|array|\Traversable|\AdapterOptions |
Returns:
Add an item.
Parameter Name | Type | Description |
---|---|---|
$key | string | |
$value | mixed |
Returns: bool
Add multiple items.
Parameter Name | Type | Description |
---|---|---|
$keyValuePairs | array |
Returns: array Array of not stored keys
Set an item only if token matches
It uses the token received from getItem() to check if the item has changed before overwriting it.
Parameter Name | Type | Description |
---|---|---|
$token | mixed | |
$key | string | |
$value | mixed |
Returns: bool
Remove items of given namespace
Parameter Name | Type | Description |
---|---|---|
$namespace | string |
Returns: bool
Remove items matching given prefix
Parameter Name | Type | Description |
---|---|---|
$prefix | string |
Returns: bool
Remove items matching given tags.
If $disjunction only one of the given tags must match else all given tags must match.
Parameter Name | Type | Description |
---|---|---|
$tags | string[] | |
$disjunction | bool |
Returns: bool
Remove expired items
Returns: bool
Decrement an item.
Parameter Name | Type | Description |
---|---|---|
$key | string | |
$value | int |
Returns: int|bool The new value on success, false on failure
Decrement multiple items.
Parameter Name | Type | Description |
---|---|---|
$keyValuePairs | array |
Returns: array Associative array of keys and new values
Flush the whole storage
Returns: bool
Get available space in bytes
Returns: int|float
Capabilities of this storage
Returns: \Capabilities
Get an item.
Parameter Name | Type | Description |
---|---|---|
$key | string | |
$success | bool | |
$casToken | mixed |
Returns: mixed Data on success, null on failure
Get multiple items.
Parameter Name | Type | Description |
---|---|---|
$keys | array |
Returns: array Associative array of keys and values
Get the storage iterator
Returns: \KeyListIterator
Get metadata of an item.
Parameter Name | Type | Description |
---|---|---|
$key | string |
Returns: array|bool Metadata on success, false on failure
Get multiple metadata
Parameter Name | Type | Description |
---|---|---|
$keys | array |
Returns: array Associative array of keys and metadata
Get options
Returns: \AdapterOptions
Get tags of an item by given key
Parameter Name | Type | Description |
---|---|---|
$key | string |
Returns: string[]|bool
Get total space in bytes
Returns: int|float
Test if an item exists.
Parameter Name | Type | Description |
---|---|---|
$key | string |
Returns: bool
Test multiple items.
Parameter Name | Type | Description |
---|---|---|
$keys | array |
Returns: array Array of found keys
Increment an item.
Parameter Name | Type | Description |
---|---|---|
$key | string | |
$value | int |
Returns: int|bool The new value on success, false on failure
Increment multiple items.
Parameter Name | Type | Description |
---|---|---|
$keyValuePairs | array |
Returns: array Associative array of keys and new values
Optimize the storage
Returns: bool
Remove an item.
Parameter Name | Type | Description |
---|---|---|
$key | string |
Returns: bool
Remove multiple items.
Parameter Name | Type | Description |
---|---|---|
$keys | array |
Returns: array Array of not removed keys
Replace an existing item.
Parameter Name | Type | Description |
---|---|---|
$key | string | |
$value | mixed |
Returns: bool
Replace multiple existing items.
Parameter Name | Type | Description |
---|---|---|
$keyValuePairs | array |
Returns: array Array of not stored keys
Store an item.
Parameter Name | Type | Description |
---|---|---|
$key | string | |
$value | mixed |
Returns: bool
Store multiple items.
Parameter Name | Type | Description |
---|---|---|
$keyValuePairs | array |
Returns: array Array of not stored keys
Set options.
Parameter Name | Type | Description |
---|---|---|
$options | array|\Traversable|\AdapterOptions |
Returns: \BlackHole Provides a fluent interface
Set tags to an item by given key.
An empty array will remove all tags.
Parameter Name | Type | Description |
---|---|---|
$key | string | |
$tags | string[] |
Returns: bool
Reset lifetime of an item
Parameter Name | Type | Description |
---|---|---|
$key | string |
Returns: bool
Reset lifetime of multiple items.
Parameter Name | Type | Description |
---|---|---|
$keys | array |
Returns: array Array of not updated keys