makeTaggable() публичный статический Метод

public static makeTaggable ( Psr\Cache\CacheItemPoolInterface $cachePool, Psr\Cache\CacheItemPoolInterface $tagStorePool = null ) : Cache\Taggable\TaggablePoolInterface
$cachePool Psr\Cache\CacheItemPoolInterface The pool to which to add tagging capabilities.
$tagStorePool Psr\Cache\CacheItemPoolInterface The pool to store tags in. If null is passed, the main pool is used.
Результат Cache\Taggable\TaggablePoolInterface
 /**
  * @param CacheItemPoolInterface $pool
  * @param array                  $config
  *
  * @return Psr6SessionHandler
  */
 public static function get(CacheItemPoolInterface $pool, $config)
 {
     if ($config['use_tagging']) {
         $pool = new FixedTaggingCachePool(TaggablePSR6PoolAdapter::makeTaggable($pool), ['session']);
     }
     return new Psr6SessionHandler($pool, $config);
 }
Пример #2
0
 /**
  * @param CacheItemPoolInterface $pool
  * @param array                  $config
  *
  * @return SymfonyValidatorBridge
  */
 public static function get(CacheItemPoolInterface $pool, $config)
 {
     if ($config['use_tagging']) {
         $pool = new FixedTaggingCachePool(TaggablePSR6PoolAdapter::makeTaggable($pool), ['validation']);
     }
     return new SymfonyValidatorBridge($pool);
 }
 /**
  * @param CacheItemPoolInterface $pool
  * @param array                  $config
  * @param array                  $tags
  *
  * @return DoctrineCacheBridge
  */
 public static function get(CacheItemPoolInterface $pool, $config, array $tags)
 {
     if ($config['use_tagging']) {
         $pool = new FixedTaggingCachePool(TaggablePSR6PoolAdapter::makeTaggable($pool), $tags);
     }
     return new DoctrineCacheBridge($pool);
 }
 public function createCachePool()
 {
     return TaggablePSR6PoolAdapter::makeTaggable(new SymfonyArrayAdapter());
 }
Пример #5
0
 /**
  * Creates and returns an instance of Taggable Cache Pool type specified by adapter name.
  *
  * @param string $adapterName The name of the adapter to use
  *
  * @return \Cache\Taggable\TaggablePoolInterface
  */
 public function makeTaggable($adapterName)
 {
     return TaggablePSR6PoolAdapter::makeTaggable($this->make($adapterName));
 }
Пример #6
0
 /**
  *
  *
  * @param CacheItemPoolInterface|null $cache Экземпляра класса кэширования по стандарту PSR-6
  * @param LoggerInterface|null $logger Экземляр класса логера сандарта PSR-3
  *
  * @api
  */
 public function __construct(CacheItemPoolInterface $cache = null, LoggerInterface $logger = null)
 {
     $this->cache = TaggablePSR6PoolAdapter::makeTaggable($cache ?: new MemoryPool());
     $this->logger = $logger ?: new NullLogger();
 }