public function deserialize($prefix, array $data) { $data = ArrayTools::stripPrefixFromArrayKeys($prefix, $data); $data = array_map(function ($cacheItem) { return CacheItem::decode($cacheItem); }, $data); /** @var CacheItem[] $data */ foreach ($data as &$item) { if ($item->isExpired()) { $item = null; continue; } if ($this->tagVersions->isAnyTagExpired($item->getTags())) { $item = null; continue; } $value = $item->getValue(); $item = $this->isSimpleType($value) ? $value : $this->coderManager->decode($value); } return $data; }
/** * @param mixed $value * * @return mixed */ public function decodeAny($value) { return $this->coderManager->decode($value); }