Subscription.php 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175
  1. <?php
  2. namespace PicoFeed\Serialization;
  3. /**
  4. * Class Subscription
  5. *
  6. * @package PicoFeed\Serialization
  7. * @author Frederic Guillot
  8. */
  9. class Subscription
  10. {
  11. protected $title = '';
  12. protected $feedUrl = '';
  13. protected $siteUrl = '';
  14. protected $category = '';
  15. protected $description = '';
  16. protected $type = '';
  17. /**
  18. * Create object instance
  19. *
  20. * @static
  21. * @access public
  22. * @return Subscription
  23. */
  24. public static function create()
  25. {
  26. return new static();
  27. }
  28. /**
  29. * Set title
  30. *
  31. * @access public
  32. * @param string $title
  33. * @return Subscription
  34. */
  35. public function setTitle($title)
  36. {
  37. $this->title = $title;
  38. return $this;
  39. }
  40. /**
  41. * Get title
  42. *
  43. * @access public
  44. * @return string
  45. */
  46. public function getTitle()
  47. {
  48. return $this->title;
  49. }
  50. /**
  51. * Set feed URL
  52. *
  53. * @access public
  54. * @param string $feedUrl
  55. * @return Subscription
  56. */
  57. public function setFeedUrl($feedUrl)
  58. {
  59. $this->feedUrl = $feedUrl;
  60. return $this;
  61. }
  62. /**
  63. * Get feed URL
  64. *
  65. * @access public
  66. * @return string
  67. */
  68. public function getFeedUrl()
  69. {
  70. return $this->feedUrl;
  71. }
  72. /**
  73. * Set site URL
  74. *
  75. * @access public
  76. * @param string $siteUrl
  77. * @return Subscription
  78. */
  79. public function setSiteUrl($siteUrl)
  80. {
  81. $this->siteUrl = $siteUrl;
  82. return $this;
  83. }
  84. /**
  85. * Get site URL
  86. *
  87. * @access public
  88. * @return string
  89. */
  90. public function getSiteUrl()
  91. {
  92. return $this->siteUrl;
  93. }
  94. /**
  95. * Set category
  96. *
  97. * @access public
  98. * @param string $category
  99. * @return Subscription
  100. */
  101. public function setCategory($category)
  102. {
  103. $this->category = $category;
  104. return $this;
  105. }
  106. /**
  107. * Get category
  108. *
  109. * @access public
  110. * @return string
  111. */
  112. public function getCategory()
  113. {
  114. return $this->category;
  115. }
  116. /**
  117. * Set description
  118. *
  119. * @access public
  120. * @param string $description
  121. * @return Subscription
  122. */
  123. public function setDescription($description)
  124. {
  125. $this->description = $description;
  126. return $this;
  127. }
  128. /**
  129. * Get description
  130. *
  131. * @access public
  132. * @return string
  133. */
  134. public function getDescription()
  135. {
  136. return $this->description;
  137. }
  138. /**
  139. * Set type
  140. *
  141. * @access public
  142. * @param string $type
  143. * @return Subscription
  144. */
  145. public function setType($type)
  146. {
  147. $this->type = $type;
  148. return $this;
  149. }
  150. /**
  151. * Get type
  152. *
  153. * @access public
  154. * @return string
  155. */
  156. public function getType()
  157. {
  158. return $this->type;
  159. }
  160. }