1 | <?php |
||
9 | class Feed |
||
10 | { |
||
11 | /** @var string */ |
||
12 | private $title; |
||
13 | |||
14 | /** @var string */ |
||
15 | private $homepageUrl; |
||
16 | |||
17 | /** @var string */ |
||
18 | private $feedUrl; |
||
19 | |||
20 | /** @var string */ |
||
21 | private $description; |
||
22 | |||
23 | /** @var string */ |
||
24 | private $userComment; |
||
25 | |||
26 | /** @var string */ |
||
27 | private $nextUrl; |
||
28 | |||
29 | /** @var string */ |
||
30 | private $icon; |
||
31 | |||
32 | /** @var string */ |
||
33 | private $favicon; |
||
34 | |||
35 | /** @var Author */ |
||
36 | private $author; |
||
37 | |||
38 | /** @var bool */ |
||
39 | private $expired; |
||
40 | |||
41 | /** @var Hub[] */ |
||
42 | private $hubs; |
||
43 | |||
44 | /** @var Item[] */ |
||
45 | private $items; |
||
46 | |||
47 | /** |
||
48 | * Constructor |
||
49 | * |
||
50 | * @param string $title |
||
51 | */ |
||
52 | public function __construct($title) |
||
59 | |||
60 | /** |
||
61 | * Get the name of the feed |
||
62 | * |
||
63 | * @return string |
||
64 | */ |
||
65 | public function getTitle() |
||
69 | |||
70 | /** |
||
71 | * Set the name of the feed |
||
72 | * |
||
73 | * @param string $title |
||
74 | * @return Feed |
||
75 | */ |
||
76 | public function setTitle($title) |
||
82 | |||
83 | /** |
||
84 | * Get the URL of the resource that the feed describes |
||
85 | * |
||
86 | * @return string |
||
87 | */ |
||
88 | public function getHomepageUrl() |
||
92 | |||
93 | /** |
||
94 | * Set the URL of the resource that the feed describes |
||
95 | * |
||
96 | * @param string $homepageUrl |
||
97 | * @return Feed |
||
98 | */ |
||
99 | public function setHomepageUrl($homepageUrl) |
||
105 | |||
106 | /** |
||
107 | * Get the URL of the feed, and serves as the unique identifier for the feed |
||
108 | * |
||
109 | * @return string |
||
110 | */ |
||
111 | public function getFeedUrl() |
||
115 | |||
116 | /** |
||
117 | * Set the URL of the feed, and serves as the unique identifier for the feed |
||
118 | * |
||
119 | * @param string $feedUrl |
||
120 | * @return Feed |
||
121 | */ |
||
122 | public function setFeedUrl($feedUrl) |
||
128 | |||
129 | /** |
||
130 | * Get more detail, beyond the `title`, on what the feed is about |
||
131 | * |
||
132 | * @return string |
||
133 | */ |
||
134 | public function getDescription() |
||
138 | |||
139 | /** |
||
140 | * Set more detail, beyond the `title`, on what the feed is about |
||
141 | * |
||
142 | * @param string $description |
||
143 | * @return Feed |
||
144 | */ |
||
145 | public function setDescription($description) |
||
151 | |||
152 | /** |
||
153 | * Get a description of the purpose of the feed |
||
154 | * |
||
155 | * @return string |
||
156 | */ |
||
157 | public function getUserComment() |
||
161 | |||
162 | /** |
||
163 | * Set a description of the purpose of the feed |
||
164 | * |
||
165 | * @param string $userComment |
||
166 | * @return Feed |
||
167 | */ |
||
168 | public function setUserComment($userComment) |
||
174 | |||
175 | /** |
||
176 | * Get the URL of a feed that provides the next n items, where n is determined by the publisher |
||
177 | * |
||
178 | * @return string |
||
179 | */ |
||
180 | public function getNextUrl() |
||
184 | |||
185 | /** |
||
186 | * Set the URL of a feed that provides the next n items, where n is determined by the publisher |
||
187 | * |
||
188 | * @param string $nextUrl |
||
189 | * @return Feed |
||
190 | */ |
||
191 | public function setNextUrl($nextUrl) |
||
197 | |||
198 | /** |
||
199 | * Get the URL of an image for the feed suitable to be used in a timeline, much the way an avatar might be used |
||
200 | * |
||
201 | * @return string |
||
202 | */ |
||
203 | public function getIcon() |
||
207 | |||
208 | /** |
||
209 | * Set the URL of an image for the feed suitable to be used in a timeline, much the way an avatar might be used |
||
210 | * |
||
211 | * @param string $icon |
||
212 | * @return Feed |
||
213 | */ |
||
214 | public function setIcon($icon) |
||
220 | |||
221 | /** |
||
222 | * Get the URL of an image for the feed suitable to be used in a source list |
||
223 | * |
||
224 | * @return string |
||
225 | */ |
||
226 | public function getFavicon() |
||
230 | |||
231 | /** |
||
232 | * Set the URL of an image for the feed suitable to be used in a source list |
||
233 | * |
||
234 | * @param string $favicon |
||
235 | * @return Feed |
||
236 | */ |
||
237 | public function setFavicon($favicon) |
||
243 | |||
244 | /** |
||
245 | * Get the feed author |
||
246 | * |
||
247 | * @return Author |
||
248 | */ |
||
249 | public function getAuthor() |
||
253 | |||
254 | /** |
||
255 | * Set the feed author |
||
256 | * |
||
257 | * @param Author $author |
||
258 | * @return Feed |
||
259 | */ |
||
260 | public function setAuthor(Author $author) |
||
266 | |||
267 | /** |
||
268 | * Set the feed author |
||
269 | * |
||
270 | * @param string $name |
||
271 | * @param string $url |
||
272 | * @return Feed |
||
273 | */ |
||
274 | public function addAuthor($name, $url = null) |
||
281 | |||
282 | /** |
||
283 | * Says whether or not the feed is finished |
||
284 | * |
||
285 | * @return bool |
||
286 | */ |
||
287 | public function isExpired() |
||
291 | |||
292 | /** |
||
293 | * Set the feed has expired |
||
294 | * |
||
295 | * @param bool $expired |
||
296 | * @return Feed |
||
297 | */ |
||
298 | public function setExpired($expired) |
||
304 | |||
305 | /** |
||
306 | * Get endpoints that can be used to subscribe to real-time notifications from the publisher of this feed |
||
307 | * |
||
308 | * @return Hub[] |
||
309 | */ |
||
310 | public function getHubs() |
||
314 | |||
315 | /** |
||
316 | * Add endpoint that can be used to subscribe to real-time notifications from the publisher of this feed |
||
317 | * |
||
318 | * @param Hub $hub |
||
319 | * @return Feed |
||
320 | */ |
||
321 | public function addHub(Hub $hub) |
||
329 | |||
330 | /** |
||
331 | * Set endpoints that can be used to subscribe to real-time notifications from the publisher of this feed |
||
332 | * |
||
333 | * @param Hub[] $hubs |
||
334 | * @return Feed |
||
335 | */ |
||
336 | public function setHubs(array $hubs) |
||
342 | |||
343 | /** |
||
344 | * Get feed items |
||
345 | * |
||
346 | * @return Item[] |
||
347 | */ |
||
348 | public function getItems() |
||
352 | |||
353 | /** |
||
354 | * Add feed item |
||
355 | * |
||
356 | * @param Item $item |
||
357 | * @return Feed |
||
358 | */ |
||
359 | public function addItem(Item $item) |
||
367 | |||
368 | /** |
||
369 | * Set feed items |
||
370 | * |
||
371 | * @param Item[] $items |
||
372 | * @return Feed |
||
373 | */ |
||
374 | public function setItems(array $items) |
||
380 | } |
||
381 |