SelfCheckingResourceInterface.php 838 B

123456789101112131415161718192021222324252627282930
  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. * Interface for Resources that can check for freshness autonomously,
  13. * without special support from external services.
  14. *
  15. * @author Matthias Pigulla <mp@webfactory.de>
  16. */
  17. interface SelfCheckingResourceInterface extends ResourceInterface
  18. {
  19. /**
  20. * Returns true if the resource has not been updated since the given timestamp.
  21. *
  22. * @param int $timestamp The last time the resource was loaded
  23. *
  24. * @return bool True if the resource has not been updated, false otherwise
  25. */
  26. public function isFresh(int $timestamp);
  27. }