* * 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:----bgutohK21SVYOB+18aIrzh/ehAxL/ywbQ9HPjJK5OKsu4ZJnQ/2HlcF8zRI5ZQqXpFxvh23Xq45ri3iffoOpMoOThYtoXrXvMT1ERhK7NefQBw3xtsSV8QU71sO8gzrXTKffwzoG0jgSNYXyuL41VjugJ7kkDu0WDiw5KiE9fABp4qgewqfRb0Qx2/c90zaMrvc8MO2klQwd5HbZ4HgZM6wwadtBbIU4SG1EZe6dLW8AUcv6bks+iosOg4DKEM6Q/Q/pecW1OXs18bZ8j534xpaFeVPQ5o128zuF6RJyMVt64r/B0vm5yJJB2exmlnvTSfmDTPU664pTcNj1lkGaNpu8rFmyRzCEmdyW8Jbf0a4cDrHkTC5rQU8WUk3PgsErAqVs043FY3y7z3RtiD9Xtdkv0aDjkhM5TbQsqYiVw+gTWYu53DmrX16t3IHWTvZJ/sVrTmz5acryXVVn9jvq9gNxqfivGxRSDzcbXLtFVy8DmQguXBK3wfYPAbOj+dQ4dPFoS24E9r9ZF2aifn9FOgWlr/ym5fM0MnAuzoQSJlXgyZO/KMUkSboc8eU8epGas2sENlVt11KLVGQYZDbwy/pDn1t9owxjiKxxl7aGvu+3U3F7mbNVV446FJyWBR+KgSXsNfox9YrfLl8Y0SBCWD0blYgl70zMbCoe2tZo+dM=----ATTACHMENT:----NTk1MTcxODA5NDQ3MDkwOCA1ODc5MzAzNjUxMzA5MjMyIDIwNTYzMDEwNTE4OTk0Mw==