interface-sitemap-cache-data.php 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. <?php
  2. /**
  3. * WPSEO plugin file.
  4. *
  5. * @package WPSEO\XML_Sitemaps
  6. */
  7. /**
  8. * Cache Data interface
  9. */
  10. interface WPSEO_Sitemap_Cache_Data_Interface {
  11. /** Status for normal, usable sitemap. */
  12. const OK = 'ok';
  13. /** Status for unusable sitemap. */
  14. const ERROR = 'error';
  15. /** Status for unusable sitemap because it cannot be identified. */
  16. const UNKNOWN = 'unknown';
  17. /**
  18. * Set the content of the sitemap
  19. *
  20. * @param string $sitemap The XML content of the sitemap.
  21. *
  22. * @return void
  23. */
  24. public function set_sitemap( $sitemap );
  25. /**
  26. * Set the status of the sitemap
  27. *
  28. * @param bool|string $usable True/False or 'ok'/'error' for status.
  29. *
  30. * @return void
  31. */
  32. public function set_status( $usable );
  33. /**
  34. * @return string The XML content of the sitemap.
  35. */
  36. public function get_sitemap();
  37. /**
  38. * Get the status of this sitemap
  39. *
  40. * @return string Status 'ok', 'error' or 'unknown'.
  41. */
  42. public function get_status();
  43. /**
  44. * Is the sitemap content usable
  45. *
  46. * @return bool True if the sitemap is usable, False if not.
  47. */
  48. public function is_usable();
  49. }