AdapterInterface.php 986 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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. * @return bool
  38. */
  39. public function clear(string $prefix = '');
  40. }