BCResourceInterfaceChecker.php 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637
  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\Config\Resource;
  11. /**
  12. * Resource checker for the ResourceInterface. Exists for BC.
  13. *
  14. * @author Matthias Pigulla <mp@webfactory.de>
  15. *
  16. * @deprecated since 2.8, to be removed in 3.0.
  17. */
  18. class BCResourceInterfaceChecker extends SelfCheckingResourceChecker
  19. {
  20. public function supports(ResourceInterface $metadata)
  21. {
  22. /* As all resources must be instanceof ResourceInterface,
  23. we support them all. */
  24. return true;
  25. }
  26. public function isFresh(ResourceInterface $resource, $timestamp)
  27. {
  28. @trigger_error(sprintf('The class "%s" is performing resource checking through ResourceInterface::isFresh(), which is deprecated since Symfony 2.8 and will be removed in 3.0', \get_class($resource)), E_USER_DEPRECATED);
  29. return parent::isFresh($resource, $timestamp); // For now, $metadata features the isFresh() method, so off we go (quack quack)
  30. }
  31. }