AdapterInterface.php 963 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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. public function getItem(mixed $key): CacheItem;
  26. /**
  27. * {@inheritdoc}
  28. *
  29. * @return iterable<string, CacheItem>
  30. */
  31. public function getItems(array $keys = []): iterable;
  32. /**
  33. * {@inheritdoc}
  34. */
  35. public function clear(string $prefix = ''): bool;
  36. }