ChannelInterface.php 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. <?php
  2. namespace Suin\RSSWriter;
  3. /**
  4. * Interface ChannelInterface
  5. * @package Suin\RSSWriter
  6. */
  7. interface ChannelInterface
  8. {
  9. /**
  10. * Set channel title
  11. * @param string $title
  12. * @return $this
  13. */
  14. public function title($title);
  15. /**
  16. * Set channel URL
  17. * @param string $url
  18. * @return $this
  19. */
  20. public function url($url);
  21. /**
  22. * Set channel description
  23. * @param string $description
  24. * @return $this
  25. */
  26. public function description($description);
  27. /**
  28. * Set ISO639 language code
  29. *
  30. * The language the channel is written in. This allows aggregators to group all
  31. * Italian language sites, for example, on a single page. A list of allowable
  32. * values for this element, as provided by Netscape, is here. You may also use
  33. * values defined by the W3C.
  34. *
  35. * @param string $language
  36. * @return $this
  37. */
  38. public function language($language);
  39. /**
  40. * Set channel copyright
  41. * @param string $copyright
  42. * @return $this
  43. */
  44. public function copyright($copyright);
  45. /**
  46. * Set channel published date
  47. * @param int $pubDate Unix timestamp
  48. * @return $this
  49. */
  50. public function pubDate($pubDate);
  51. /**
  52. * Set channel last build date
  53. * @param int $lastBuildDate Unix timestamp
  54. * @return $this
  55. */
  56. public function lastBuildDate($lastBuildDate);
  57. /**
  58. * Set channel ttl (minutes)
  59. * @param int $ttl
  60. * @return $this
  61. */
  62. public function ttl($ttl);
  63. /**
  64. * Add item object
  65. * @param ItemInterface $item
  66. * @return $this
  67. */
  68. public function addItem(ItemInterface $item);
  69. /**
  70. * Append to feed
  71. * @param FeedInterface $feed
  72. * @return $this
  73. */
  74. public function appendTo(FeedInterface $feed);
  75. /**
  76. * Return XML object
  77. * @return SimpleXMLElement
  78. */
  79. public function asXML();
  80. }