AdapterInterface.php 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. <?php
  2. /*
  3. * This file is part of the Symfony package.
  4. *
  5. * (c) Fabien Potencier <fabien@symfony.com>
  6. *
  7. * For the full copyright and license information, please view the LICENSE
  8. * file that was distributed with this source code.
  9. */
  10. namespace Symfony\Component\Cache\Adapter;
  11. use Psr\Cache\CacheItemPoolInterface;
  12. use Symfony\Component\Cache\CacheItem;
  13. // Help opcache.preload discover always-needed symbols
  14. class_exists(CacheItem::class);
  15. /**
  16. * Interface for adapters managing instances of Symfony's CacheItem.
  17. *
  18. * @author Kévin Dunglas <dunglas@gmail.com>
  19. */
  20. interface AdapterInterface extends CacheItemPoolInterface
  21. {
  22. /**
  23. * {@inheritdoc}
  24. *
  25. * @return CacheItem
  26. */
  27. public function getItem($key);
  28. /**
  29. * {@inheritdoc}
  30. *
  31. * @return \Traversable|CacheItem[]
  32. */
  33. public function getItems(array $keys = []);
  34. /**
  35. * {@inheritdoc}
  36. *
  37. * @param string $prefix
  38. *
  39. * @return bool
  40. */
  41. public function clear(/* string $prefix = '' */);
  42. }