芝麻web文件管理V1.00
编辑当前文件:/home/qrafawbu/thefirstcookout.com/support/application/vendor/symfony/cache/Traits/ArrayTrait.php
* * @internal */ trait ArrayTrait { use LoggerAwareTrait; private $storeSerialized; private $values = array(); private $expiries = array(); /** * Returns all cached values, with cache miss as null. * * @return array */ public function getValues() { return $this->values; } /** * {@inheritdoc} */ public function hasItem($key) { CacheItem::validateKey($key); return isset($this->expiries[$key]) && ($this->expiries[$key] >= time() || !$this->deleteItem($key)); } /** * {@inheritdoc} */ public function clear() { $this->values = $this->expiries = array(); return true; } /** * {@inheritdoc} */ public function deleteItem($key) { CacheItem::validateKey($key); unset($this->values[$key], $this->expiries[$key]); return true; } private function generateItems(array $keys, $now, $f) { foreach ($keys as $i => $key) { try { if (!$isHit = isset($this->expiries[$key]) && ($this->expiries[$key] >= $now || !$this->deleteItem($key))) { $this->values[$key] = $value = null; } elseif (!$this->storeSerialized) { $value = $this->values[$key]; } elseif ('b:0;' === $value = $this->values[$key]) { $value = false; } elseif (false === $value = unserialize($value)) { $this->values[$key] = $value = null; $isHit = false; } } catch (\Exception $e) { CacheItem::log($this->logger, 'Failed to unserialize key "{key}"', array('key' => $key, 'exception' => $e)); $this->values[$key] = $value = null; $isHit = false; } unset($keys[$i]); yield $key => $f($key, $value, $isHit); } foreach ($keys as $key) { yield $key => $f($key, null, false); } } }