CacheException.php 489 B

123456789101112131415161718192021222324252627
  1. <?php
  2. namespace Doctrine\DBAL\Cache;
  3. use Doctrine\DBAL\Exception;
  4. /**
  5. * @psalm-immutable
  6. */
  7. class CacheException extends Exception
  8. {
  9. /**
  10. * @return CacheException
  11. */
  12. public static function noCacheKey()
  13. {
  14. return new self('No cache key was set.');
  15. }
  16. /**
  17. * @return CacheException
  18. */
  19. public static function noResultDriverConfigured()
  20. {
  21. return new self('Trying to cache a query but no result driver is configured.');
  22. }
  23. }