コード例 #1
0
ファイル: Pool.php プロジェクト: Circlus/scrapbook
 /**
  * This does exactly what getItemWithoutGenerateCacheKey does, but by multi-
  * fetching multiple items.
  *
  * @param array $keys
  *
  * @return array
  */
 protected function getItemsWithoutGenerateCacheKey(array $keys)
 {
     /** @var CacheItemInterface[] $items */
     $items = $this->pool->getItems($keys);
     $taggableItems = [];
     foreach ($items as $item) {
         // wrap the pool's result item into a Taggable/Item
         $taggableItem = new Item($item);
         $taggableItems[$taggableItem->getKey()] = $taggableItem;
     }
     return $taggableItems;
 }
コード例 #2
0
 public function getItems(array $keys = [])
 {
     return array_map(function (CacheItemInterface $inner) {
         return $this->decorate($inner);
     }, $this->decorated->getItems($keys));
 }
コード例 #3
0
ファイル: WrapperPool.php プロジェクト: jivoo/core
 /**
  * {@inheritdoc}
  */
 public function getItems(array $keys = array())
 {
     return $this->pool->getItems($keys);
 }
コード例 #4
0
ファイル: DefaultCacheAdapter.php プロジェクト: shieldo/Cache
 /**
  * {@inheritdoc}
  */
 public function getItems(array $keys = [])
 {
     return $this->defaultAdapter->getItems($keys);
 }