ResourceInterface.php 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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. * ResourceInterface is the interface that must be implemented by all Resource classes.
  13. *
  14. * @author Fabien Potencier <fabien@symfony.com>
  15. */
  16. interface ResourceInterface
  17. {
  18. /**
  19. * Returns a string representation of the Resource.
  20. *
  21. * @return string A string representation of the Resource
  22. */
  23. public function __toString();
  24. /**
  25. * Returns true if the resource has not been updated since the given timestamp.
  26. *
  27. * @param integer $timestamp The last time the resource was loaded
  28. *
  29. * @return Boolean true if the resource has not been updated, false otherwise
  30. */
  31. public function isFresh($timestamp);
  32. /**
  33. * Returns the resource tied to this Resource.
  34. *
  35. * @return mixed The resource
  36. */
  37. public function getResource();
  38. }