AdapterInterface.php 898 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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. /**
  14. * Interface for adapters managing instances of Symfony's CacheItem.
  15. *
  16. * @author Kévin Dunglas <dunglas@gmail.com>
  17. */
  18. interface AdapterInterface extends CacheItemPoolInterface
  19. {
  20. /**
  21. * {@inheritdoc}
  22. *
  23. * @return CacheItem
  24. */
  25. public function getItem($key);
  26. /**
  27. * {@inheritdoc}
  28. *
  29. * @return \Traversable|CacheItem[]
  30. */
  31. public function getItems(array $keys = []);
  32. /**
  33. * {@inheritdoc}
  34. *
  35. * @return bool
  36. */
  37. public function clear(string $prefix = '');
  38. }