ResourceInterface.php 981B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <?php
  2. /*
  3. * This file is part of the Assetic package, an OpenSky project.
  4. *
  5. * (c) 2010-2011 OpenSky Project Inc
  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 Assetic\Factory\Resource;
  11. /**
  12. * A resource is something formulae can be loaded from.
  13. *
  14. * @author Kris Wallsmith <kris.wallsmith@gmail.com>
  15. */
  16. interface ResourceInterface
  17. {
  18. /**
  19. * Checks if a timestamp represents the latest resource.
  20. *
  21. * @param integer $timestamp A UNIX timestamp
  22. *
  23. * @return Boolean True if the timestamp is up to date
  24. */
  25. function isFresh($timestamp);
  26. /**
  27. * Returns the content of the resource.
  28. *
  29. * @return string The content
  30. */
  31. function getContent();
  32. /**
  33. * Returns a unique string for the current resource.
  34. *
  35. * @return string A unique string to identity the current resource
  36. */
  37. function __toString();
  38. }