BridgeInterface.php 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. <?php
  2. interface BridgeInterface {
  3. /**
  4. * Collects data from the site
  5. */
  6. public function collectData();
  7. /**
  8. * Returns an array of cachable elements
  9. *
  10. * @return array Associative array of cachable elements
  11. */
  12. public function getCachable();
  13. /**
  14. * Returns the description
  15. *
  16. * @return string Description
  17. */
  18. public function getDescription();
  19. /**
  20. * Return an array of extra information
  21. *
  22. * @return array Associative array of extra information
  23. */
  24. public function getExtraInfos();
  25. /**
  26. * Returns an array of collected items
  27. *
  28. * @return array Associative array of items
  29. */
  30. public function getItems();
  31. /**
  32. * Returns the bridge maintainer
  33. *
  34. * @return string Bridge maintainer
  35. */
  36. public function getMaintainer();
  37. /**
  38. * Returns the bridge name
  39. *
  40. * @return string Bridge name
  41. */
  42. public function getName();
  43. /**
  44. * Returns the bridge parameters
  45. *
  46. * @return array Bridge parameters
  47. */
  48. public function getParameters();
  49. /**
  50. * Returns the bridge URI
  51. *
  52. * @return string Bridge URI
  53. */
  54. public function getURI();
  55. /**
  56. * Sets the cache instance
  57. *
  58. * @param object CacheInterface The cache instance
  59. */
  60. public function setCache(\CacheInterface $cache);
  61. /**
  62. * Sets the timeout for clearing the cache files. The timeout must be
  63. * specified between 1..86400 seconds (max. 24 hours). The default timeout
  64. * (specified by the bridge maintainer) applies for invalid values.
  65. *
  66. * @param int $timeout The cache timeout in seconds
  67. */
  68. public function setCacheTimeout($timeout);
  69. /**
  70. * Returns the cache timeout
  71. *
  72. * @return int Cache timeout
  73. */
  74. public function getCacheTimeout();
  75. }