/
class.RSSItem.inc.php
82 lines (71 loc) · 1.99 KB
/
class.RSSItem.inc.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
<?php
require_once 'class.RSSBase.inc.php';
/**
* Class for creating an RSS-feed
* @author Michael Wimmer <flaimo@gmail.com>
* @category flaimo-php
* @copyright Copyright © 2002-2008, Michael Wimmer
* @license GNU General Public License v3
* @link http://code.google.com/p/flaimo-php/
* @package RSS
* @version 2.2.1
*/
class RSSItem extends RSSBase {
protected $about;
protected $title;
protected $link;
protected $description;
protected $subject;
protected $date;
protected $author;
protected $comments;
protected $image;
function __construct($about = '',
$title = '',
$link = '',
$description = '',
$subject = '',
$date = 0,
$author = '',
$comments = '',
$image = '') {
parent::__construct();
parent::setVar($about, 'about', 'string');
parent::setVar($title, 'title', 'string');
parent::setVar($link, 'link', 'string');
parent::setVar($description, 'description', 'string');
parent::setVar($subject, 'subject', 'string');
parent::setVar($date, 'date', 'int');
parent::setVar($author, 'author', 'string');
parent::setVar($comments, 'comments', 'string');
parent::setVar($image, 'image', 'string');
} // end constructor
public function getAbout() {
return parent::getVar('about');
} // end function
public function getTitle() {
return parent::getVar('title');
} // end function
public function getLink() {
return parent::getVar('link');
} // end function
public function getDescription() {
return parent::getVar('description');
} // end function
public function getSubject() {
return parent::getVar('subject');
} // end function
public function getItemDate() {
return parent::getVar('date');
} // end function
public function getAuthor() {
return parent::getVar('author');
} // end function
public function getComments() {
return parent::getVar('comments');
} // end function
public function getImage() {
return parent::getVar('image');
} // end function
} // end class
?>