Fully Qualified Name: | Zend\Cache\Storage\Adapter\Filesystem |
Extends: | AbstractAdapter |
Implements: | AvailableSpaceCapableInterface, ClearByNamespaceInterface, ClearByPrefixInterface, ClearExpiredInterface, FlushableInterface, IterableInterface, OptimizableInterface, TaggableInterface, TotalSpaceCapableInterface |
Name | Description | Defined By |
---|---|---|
__construct() | Constructor | AbstractAdapter |
__destruct() | Destructor | AbstractAdapter |
addItem() | Add an item. | Filesystem |
addItems() | Add multiple items. | Filesystem |
addPlugin() | Register a plugin | AbstractAdapter |
checkAndSetItem() | Set an item only if token matches | Filesystem |
clearByNamespace() | Remove items by given namespace | Filesystem |
clearByPrefix() | Remove items matching given prefix | Filesystem |
clearByTags() | Remove items matching given tags. | Filesystem |
clearExpired() | Remove expired items | Filesystem |
decrementItem() | Decrement an item. | AbstractAdapter |
decrementItems() | Decrement multiple items. | AbstractAdapter |
flush() | Flush the whole storage | Filesystem |
getAvailableSpace() | Get available space in bytes | Filesystem |
getCaching() | Get caching enabled. | AbstractAdapter |
getCapabilities() | Get capabilities of this adapter | AbstractAdapter |
getEventManager() | Get the event manager | AbstractAdapter |
getItem() | Get an item. | Filesystem |
getItems() | Get multiple items. | Filesystem |
getIterator() | Get the storage iterator | Filesystem |
getMetadata() | Get metadata | Filesystem |
getMetadatas() | Get metadatas | Filesystem |
getOptions() | Get options. | Filesystem |
getPluginRegistry() | Return registry of plugins | AbstractAdapter |
getTags() | Get tags of an item by given key | Filesystem |
getTotalSpace() | Get total space in bytes | Filesystem |
hasItem() | Test if an item exists. | Filesystem |
hasItems() | Test multiple items. | Filesystem |
hasPlugin() | Check if a plugin is registered | AbstractAdapter |
incrementItem() | Increment an item. | AbstractAdapter |
incrementItems() | Increment multiple items. | AbstractAdapter |
optimize() | Optimize the storage | Filesystem |
removeItem() | Remove an item. | Filesystem |
removeItems() | Remove multiple items. | Filesystem |
removePlugin() | Unregister an already registered plugin | AbstractAdapter |
replaceItem() | Replace an existing item. | Filesystem |
replaceItems() | Replace multiple existing items. | Filesystem |
setCaching() | Enable/Disable caching. | AbstractAdapter |
setItem() | Store an item. | Filesystem |
setItems() | Store multiple items. | Filesystem |
setOptions() | Set options. | Filesystem |
setTags() | Set tags to an item by given key. | Filesystem |
touchItem() | Reset lifetime of an item | Filesystem |
touchItems() | Reset lifetime of multiple items. | Filesystem |
Constructor
Parameter Name | Type | Description |
---|---|---|
$options | null|array|\Traversable|\AdapterOptions |
Returns:
Destructor
detach all registered plugins to free event handles of event manager
Returns: void
Add an item.
Parameter Name | Type | Description |
---|---|---|
$key | string | |
$value | mixed |
Returns: bool
Add multiple items.
Parameter Name | Type | Description |
---|---|---|
$keyValuePairs | array |
Returns: bool
Register a plugin
Parameter Name | Type | Description |
---|---|---|
$plugin | \Plugin\PluginInterface | |
$priority | int |
Returns: \AbstractAdapter Provides a fluent interface
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 by 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: float
Get caching enabled.
Alias of getWritable and getReadable.
Returns: bool
Get capabilities of this adapter
Returns: \Capabilities
Get the event manager
Returns: \EventManagerInterface
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: \FilesystemIterator
Get metadata
Parameter Name | Type | Description |
---|---|---|
$key | string |
Returns: array|bool Metadata on success, false on failure
Get metadatas
Parameter Name | Type | Description |
---|---|---|
$keys | array | |
$options | array |
Returns: array Associative array of keys and metadata
Get options.
Returns: \FilesystemOptions
Return registry of plugins
Returns: \SplObjectStorage
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
Check if a plugin is registered
Parameter Name | Type | Description |
---|---|---|
$plugin | \Plugin\PluginInterface |
Returns: bool
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
Unregister an already registered plugin
Parameter Name | Type | Description |
---|---|---|
$plugin | \Plugin\PluginInterface |
Returns: \AbstractAdapter Provides a fluent interface
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: bool
Enable/Disable caching.
Alias of setWritable and setReadable.
Parameter Name | Type | Description |
---|---|---|
$flag | bool |
Returns: \AbstractAdapter Provides a fluent interface
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|\FilesystemOptions |
Returns: \Filesystem
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