1
|
|
|
<?php |
2
|
|
|
declare(strict_types=1); |
3
|
|
|
|
4
|
|
|
namespace Nexendrie\Rss; |
5
|
|
|
|
6
|
|
|
/** |
7
|
|
|
* Rss Channel Item |
8
|
|
|
* |
9
|
|
|
* @author Jakub Konečný |
10
|
|
|
* @property string $title |
11
|
|
|
* @property string $description |
12
|
|
|
* @property string $link |
13
|
|
|
* @property int $pubDate |
14
|
|
|
* @property string $author |
15
|
|
|
* @property string $comments |
16
|
|
|
* @property string $guid |
17
|
|
|
*/ |
18
|
1 |
|
class RssChannelItem { |
19
|
1 |
|
use \Nette\SmartObject; |
20
|
|
|
|
21
|
|
|
/** @var string */ |
22
|
|
|
protected $title; |
23
|
|
|
/** @var string */ |
24
|
|
|
protected $description; |
25
|
|
|
/** @var string */ |
26
|
|
|
protected $link; |
27
|
|
|
/** @var int */ |
28
|
|
|
protected $pubDate; |
29
|
|
|
/** @var string */ |
30
|
|
|
protected $author = ""; |
31
|
|
|
/** @var string */ |
32
|
|
|
protected $comments = ""; |
33
|
|
|
/** @var string */ |
34
|
|
|
protected $guid = ""; |
35
|
|
|
|
36
|
|
|
public function __construct(string $title, string $description, string $link, int $pubDate) { |
37
|
1 |
|
$this->title = $title; |
38
|
1 |
|
$this->description = $description; |
39
|
1 |
|
$this->link = $link; |
40
|
1 |
|
$this->pubDate = $pubDate; |
41
|
1 |
|
} |
42
|
|
|
|
43
|
|
|
public function getTitle(): string { |
44
|
1 |
|
return $this->title; |
45
|
|
|
} |
46
|
|
|
|
47
|
|
|
public function setTitle(string $title): void { |
48
|
1 |
|
$this->title = $title; |
49
|
1 |
|
} |
50
|
|
|
|
51
|
|
|
public function getDescription(): string { |
52
|
1 |
|
return $this->description; |
53
|
|
|
} |
54
|
|
|
|
55
|
|
|
public function setDescription(string $description): void { |
56
|
1 |
|
$this->description = $description; |
57
|
1 |
|
} |
58
|
|
|
|
59
|
|
|
public function getLink(): string { |
60
|
1 |
|
return $this->link; |
61
|
|
|
} |
62
|
|
|
|
63
|
|
|
public function setLink(string $link): void { |
64
|
1 |
|
$this->link = $link; |
65
|
1 |
|
} |
66
|
|
|
|
67
|
|
|
public function getPubDate(): int { |
68
|
1 |
|
return $this->pubDate; |
69
|
|
|
} |
70
|
|
|
|
71
|
|
|
public function setPubDate(int $pubDate): void { |
72
|
1 |
|
$this->pubDate = $pubDate; |
73
|
1 |
|
} |
74
|
|
|
|
75
|
|
|
public function getAuthor(): string { |
76
|
1 |
|
return $this->author; |
77
|
|
|
} |
78
|
|
|
|
79
|
|
|
public function setAuthor(string $author): void { |
80
|
1 |
|
$this->author = $author; |
81
|
1 |
|
} |
82
|
|
|
|
83
|
|
|
public function getComments(): string { |
84
|
1 |
|
return $this->comments; |
85
|
|
|
} |
86
|
|
|
|
87
|
|
|
public function setComments(string $comments): void { |
88
|
1 |
|
$this->comments = $comments; |
89
|
1 |
|
} |
90
|
|
|
|
91
|
|
|
public function getGuid(): string { |
92
|
1 |
|
return $this->guid; |
93
|
|
|
} |
94
|
|
|
|
95
|
|
|
public function setGuid(string $guid): void { |
96
|
1 |
|
$this->guid = $guid; |
97
|
1 |
|
} |
98
|
|
|
} |
99
|
|
|
?> |