ParserCacheInterface.php 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  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\ExpressionLanguage\ParserCache;
  11. @trigger_error('The '.__NAMESPACE__.'\ParserCacheInterface interface is deprecated since Symfony 3.2 and will be removed in 4.0. Use Psr\Cache\CacheItemPoolInterface instead.', E_USER_DEPRECATED);
  12. use Symfony\Component\ExpressionLanguage\ParsedExpression;
  13. /**
  14. * @author Adrien Brault <adrien.brault@gmail.com>
  15. *
  16. * @deprecated since version 3.2, to be removed in 4.0. Use Psr\Cache\CacheItemPoolInterface instead.
  17. */
  18. interface ParserCacheInterface
  19. {
  20. /**
  21. * Saves an expression in the cache.
  22. *
  23. * @param string $key The cache key
  24. * @param ParsedExpression $expression A ParsedExpression instance to store in the cache
  25. */
  26. public function save($key, ParsedExpression $expression);
  27. /**
  28. * Fetches an expression from the cache.
  29. *
  30. * @param string $key The cache key
  31. *
  32. * @return ParsedExpression|null
  33. */
  34. public function fetch($key);
  35. }