com\setasign\SetaFramework\SimpleCache\Fastcache\Drivers\Predis
Item CacheItemInterface defines an interface for interacting with objects inside a cache.
File: /SetaFramework/src/SimpleCache/Fastcache/Drivers/Predis/Item.php
Class hierarchy
- Phpfastcache\Drivers\Predis\Item
Implements
- \JsonSerializable
- \Phpfastcache\Core\Item\ExtendedCacheItemInterface
- \Phpfastcache\Core\Item\TaggableCacheItemInterface
- \Phpfastcache\Event\EventManagerDispatcherInterface
- \Phpfastcache\Util\ClassNamespaceResolverInterface
- \Psr\Cache\CacheItemInterface
Summary
Methods
- __construct()
- _getData()
- addTag()
- addTags()
- append()
- clearRemovedTags()
- cloneInto()
- decrement()
- demutateDatetime()
- doesItemBelongToThatDriverBackend()
- expiresAfter()
- expiresAt()
- get()
- getClassName()
- getCreationDate()
- getDataAsJsonString()
- getDriverClass()
- getEncodedKey()
- getEventManager()
- getExpirationDate()
- getKey()
- getLength()
- getModificationDate()
- getRemovedTags()
- getTags()
- getTagsAsString()
- getTtl()
- hasEventManager()
- hasTag()
- hasTags()
- increment()
- isEmpty()
- isExpired()
- isHit()
- isNull()
- isTagged()
- jsonSerialize()
- prepend()
- removeTag()
- removeTags()
- set()
- setCreationDate()
- setDriver()
- setEventManager()
- setExpirationDate()
- setHit()
- setModificationDate()
- setTags()
Constants
TAG_STRATEGY_ALL
Allows you to get cache item(s) by ALL of the specified matching tag(s) The cache item CAN have additional tag(s)
TAG_STRATEGY_ONE
Allows you to get cache item(s) by at least ONE of the specified matching tag(s). Default behavior
TAG_STRATEGY_ONLY
Allows you to get cache item(s) by ONLY the specified matching tag(s) The cache item CANNOT have additional tag(s)
Static Properties
$namespaces
-
Properties
$eventManager
-
$removedTags
-
Static Methods
buildTokenClasses()
-
string $class,
string[] $classes,
int $index,
array<array<mixed>|string> $tokens
Parameters
- $namespace : string
- $class : string
- $classes : string[]
- $index : int
- $tokens : array<array<mixed>|string>
buildTokenNamespace()
-
array<array<mixed>|string> $tokens
Parameters
- $index : int
- $tokens : array<array<mixed>|string>
createClassMap()
-
Iterate over all files in the given directory searching for classes.
NOTICE: This method has been borrowed from Symfony ClassLoader 3.4 since they deprecated the whole component as of SF4. Our thanks to them.
Parameters
- $dir : string
The directory to search in or an iterator
Return Values
A class map array
findClasses()
-
Extract the classes in the given file.
NOTICE: This method has been borrowed from Symfony ClassLoader 3.4 since they deprecated the whole component as of SF4. Our thanks to them.
Parameters
- $path : string
The file to check
Return Values
The found classes
getClassNamespace()
-
Methods
__construct()
-
string $key,
\Phpfastcache\Event\EventManagerInterface $em
Item constructor.
Parameters
- $driver : \Phpfastcache\Core\Pool\ExtendedCacheItemPoolInterface
- $key : string
- $em : \Phpfastcache\Event\EventManagerInterface
Exceptions
Throws \Phpfastcache\Exceptions\PhpfastcacheInvalidArgumentException
addTag()
-
Parameters
- $tagName : string
addTags()
-
Parameters
- $tagNames : string[]
append()
-
Parameters
- $data : array|string
Exceptions
Throws \Phpfastcache\Exceptions\PhpfastcacheInvalidTypeException
clearRemovedTags()
-
cloneInto()
-
?\Phpfastcache\Core\Pool\ExtendedCacheItemPoolInterface $itemPoolTarget = null
Parameters
- $itemTarget : \Phpfastcache\Core\Item\ExtendedCacheItemInterface
- $itemPoolTarget : ?\Phpfastcache\Core\Pool\ExtendedCacheItemPoolInterface
Exceptions
Throws \Phpfastcache\Exceptions\PhpfastcacheLogicException
Throws \Phpfastcache\Exceptions\PhpfastcacheInvalidArgumentException
decrement()
-
Parameters
- $step : int
Exceptions
Throws \Phpfastcache\Exceptions\PhpfastcacheInvalidTypeException
demutateDatetime()
-
Parameters
- $dateTime : \DateTimeInterface
doesItemBelongToThatDriverBackend()
-
Parameters
- $driverPool : \Phpfastcache\Core\Pool\ExtendedCacheItemPoolInterface
expiresAfter()
-
Parameters
- $time : int|\DateInterval|null
Exceptions
Throws \Phpfastcache\Exceptions\PhpfastcacheInvalidArgumentException
Throws \Exception
expiresAt()
-
Parameters
- $expiration : ?\DateTimeInterface
Exceptions
Throws \Phpfastcache\Exceptions\PhpfastcacheInvalidArgumentException
getDataAsJsonString()
-
int $depth = 512
Return the data as a well-formatted string. Any scalar value will be cast to an array
Parameters
- $options : int
\json_encode() options
- $depth : int
\json_encode() depth
getEncodedKey()
-
getEventManager()
-
getExpirationDate()
-
getLength()
-
Return the data length: Either the string length if it's a string (binary mode)
or the number of element (count) if it's an array
or the number returned by count() if it's an object implementing \Countable interface
-1 for anything else
getModificationDate()
-
Exceptions
Throws \Phpfastcache\Exceptions\PhpfastcacheLogicException
getRemovedTags()
-
getTagsAsString()
-
Parameters
- $separator : string
hasEventManager()
-
WARNING: This method is marked as deprecated!
Will be removed in v10
hasTag()
-
Parameters
- $tagName : string
hasTags()
-
int $strategy = \Phpfastcache\Core\Item\TaggableCacheItemInterface::TAG_STRATEGY_ONE
Parameters
- $tagNames : string[]
- $strategy : int
Exceptions
Throws \Phpfastcache\Exceptions\PhpfastcacheInvalidArgumentException
increment()
-
Parameters
- $step : int
Exceptions
Throws \Phpfastcache\Exceptions\PhpfastcacheInvalidTypeException
jsonSerialize()
-
prepend()
-
Parameters
- $data : array|string
Exceptions
Throws \Phpfastcache\Exceptions\PhpfastcacheInvalidTypeException
removeTag()
-
Parameters
- $tagName : string
removeTags()
-
Parameters
- $tagNames : string[]
set()
-
Parameters
- $value : mixed
Exceptions
Throws \Phpfastcache\Exceptions\PhpfastcacheInvalidArgumentException
setCreationDate()
-
Parameters
- $date : \DateTimeInterface
Exceptions
Throws \Phpfastcache\Exceptions\PhpfastcacheLogicException
setDriver()
-
Parameters
- $driver : \Phpfastcache\Core\Pool\ExtendedCacheItemPoolInterface
Exceptions
Throws \Phpfastcache\Exceptions\PhpfastcacheInvalidArgumentException
setEventManager()
-
Parameters
- $em : \Phpfastcache\Event\EventManagerInterface
setExpirationDate()
-
Parameters
- $expiration : \DateTimeInterface
Exceptions
Throws \Phpfastcache\Exceptions\PhpfastcacheInvalidArgumentException
setHit()
-
Parameters
- $isHit : bool
setModificationDate()
-
Parameters
- $date : \DateTimeInterface
Exceptions
Throws \Phpfastcache\Exceptions\PhpfastcacheLogicException
setTags()
-
Parameters
- $tags : string[]
Exceptions
Throws \Phpfastcache\Exceptions\PhpfastcacheInvalidArgumentException
