diff options
author | Alessandro Cosentino <cosenal@gmail.com> | 2012-05-20 19:14:34 -0400 |
---|---|---|
committer | Alessandro Cosentino <cosenal@gmail.com> | 2012-05-20 19:14:34 -0400 |
commit | 2a15c85cd9c08af627798c61eced0511b05a1ac3 (patch) | |
tree | 96824baa8d9748669851fd95714448d2bcd880fd /lib/item.php | |
parent | 4cb80788b059506fa30c8aeae3da87dec931332b (diff) |
fetching items from remote feed working now
Diffstat (limited to 'lib/item.php')
-rw-r--r-- | lib/item.php | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/lib/item.php b/lib/item.php index 0c397c18d..96fbf4f09 100644 --- a/lib/item.php +++ b/lib/item.php @@ -33,15 +33,19 @@ class StatusFlag{ * * It encapsulate a SimplePie_Item object and adds a status flag to it */ -class OC_News_Item extends SimplePie_Item { +class OC_News_Item { private $status; //a bit-field set with status flags private $spitem; //encapsulate a SimplePie_Item object private $itemid; + private $title; + private $url; - public function __construct($spitem){ + public function __construct(SimplePie_Item $spitem){ $this->status |= StatusFlag::Unread; $this->spitem = $spitem; + $this->title = $spitem->get_title(); + $this->url = $spitem->get_permalink(); } public function getId(){ @@ -64,6 +68,11 @@ class OC_News_Item extends SimplePie_Item { return ($this->status & ~StatusFlag::Unread); } + public function getTitle(){ + return $this->title; + } - + public function getUrl(){ + return $this->url; + } } |