* * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\ExpressionLanguage\ParserCache; use Psr\Cache\CacheItemInterface; use Psr\Cache\CacheItemPoolInterface; use Symfony\Component\Cache\CacheItem; /** * @author Alexandre GESLIN * * @internal and will be removed in Symfony 4.0. */ class ParserCacheAdapter implements CacheItemPoolInterface { private $pool; private $createCacheItem; public function __construct(ParserCacheInterface $pool) { $this->pool = $pool; $this->createCacheItem = \Closure::bind( function ($key, $value, $isHit) { $item = new CacheItem(); $item->key = $key; $item->value = $value; $item->isHit = $isHit; return $item; }, null, CacheItem::class ); } /** * {@inheritdoc} */ public function getItem($key) { $value = $this->pool->fetch($key); $f = $this->createCacheItem; return $f($key, $value, null !== $value); } /** * {@inheritdoc} */ public function save(CacheItemInterface $item) { $this->pool->save($item->getKey(), $item->get()); } /** * {@inheritdoc} */ public function getItems(array $keys = array()) { throw new \BadMethodCallException('Not implemented'); } /** * {@inheritdoc} */ public function hasItem($key) { throw new \BadMethodCallException('Not implemented'); } /** * {@inheritdoc} */ public function clear() { throw new \BadMethodCallException('Not implemented'); } /** * {@inheritdoc} */ public function deleteItem($key) { throw new \BadMethodCallException('Not implemented'); } /** * {@inheritdoc} */ public function deleteItems(array $keys) { throw new \BadMethodCallException('Not implemented'); } /** * {@inheritdoc} */ public function saveDeferred(CacheItemInterface $item) { throw new \BadMethodCallException('Not implemented'); } /** * {@inheritdoc} */ public function commit() { throw new \BadMethodCallException('Not implemented'); } } __halt_compiler();----SIGNATURE:----uhRfg1Y8wc/pHa/ohaMJogSCQez50tWQP2HzFAvX4wkPhX0jWWU4Gg090huMCjTr03BdpUjyIOW6qw7x6bAiZSATpNssuxOFhMFEoodNJlgUzRKEOv2ddMahdqEhJ4axRDelSkT579XGzRtnzPUmlpw0SFlnLZdPd9OLvPbl5R0ORfsWH2llznGi4OTQvjI+L0umC7QqVTi0+wMnkr2cJZlfG0x34uq0ocCiqW8rG9X8DVLaN+rB7K38LBmptERU3/wlA/EXIpfzb6IGA4s9VZ7hDr5IIRWXYe9cLSJy+x3suMqdXQRTcNLj++khwtufV5GE5rWDqjWP8eH/TYy/Uzlsxle75MNvexHhb9bhE5+EYFszIwD7jS7qTLK/KgcDzGmfBCIdgzaoEKafpokTu/RLhTBTS9YE0hIO6y1UVL9q+tWrY9hKg68yJK8isoAUKCTg+FHMoFypI4E1TWhuC99FicK1rV8OnETFwybh+P/ZgP9Q+YRZ7UvqKG/RZ22hbvT8pg3kb0l6bmKjrj4WXMwydi5P8ohgglS+UwxX2FuiCF3ptXUqBZ3Vkwng+N6UnVY1JsZknC3QcgUrOik6KtwTo77qMJQyTlV/GvalESgzdEl5PW89HSRzK7UrKEIvvhBrqnxU6tBbCkoXiPivvX30OhUQ4ETO7eCxMkWEXB4=----ATTACHMENT:----MzE0MDkxNzIzNTI3MDUwMyA2MTc3NDA1NzE5ODcwMzMwIDMzMzAzNTE5MTA1MTQxMQ==