Drupal investigation

CacheInterface.php 1.0KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  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\Validator\Mapping\Cache;
  11. use Symfony\Component\Validator\Mapping\ClassMetadata;
  12. /**
  13. * Persists ClassMetadata instances in a cache.
  14. *
  15. * @author Bernhard Schussek <bschussek@gmail.com>
  16. */
  17. interface CacheInterface
  18. {
  19. /**
  20. * Returns whether metadata for the given class exists in the cache.
  21. *
  22. * @param string $class
  23. */
  24. public function has($class);
  25. /**
  26. * Returns the metadata for the given class from the cache.
  27. *
  28. * @param string $class Class Name
  29. *
  30. * @return ClassMetadata|false A ClassMetadata instance or false on miss
  31. */
  32. public function read($class);
  33. /**
  34. * Stores a class metadata in the cache.
  35. *
  36. * @param ClassMetadata $metadata A Class Metadata
  37. */
  38. public function write(ClassMetadata $metadata);
  39. }