diff options
Diffstat (limited to 'lib/item.php')
-rw-r--r-- | lib/item.php | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/lib/item.php b/lib/item.php index acef41c92..e64eaa044 100644 --- a/lib/item.php +++ b/lib/item.php @@ -33,7 +33,8 @@ class Item { private $status; //a bit-field set with status flags private $id; //id of the item in the database table private $author; - + private $date; //date is stored in the Unix format + public function __construct($url, $title, $guid, $body, $id = null){ $this->title = $title; $this->url = $url; @@ -98,6 +99,10 @@ class Item { public function setStatus($status){ $this->status = $status; } + + /* change the following method with set/get magic methods + * http://www.php.net/manual/en/language.oop5.overloading.php#object.get + */ public function getTitle(){ return $this->title; @@ -130,4 +135,13 @@ class Item { public function setAuthor($author){ $this->author = $author; } + + public function getDate(){ + return $this->date; + } + + //TODO: check if the parameter is in the Unix format + public function setDate($date){ + $this->date = $date; + } } |