From 2a15c85cd9c08af627798c61eced0511b05a1ac3 Mon Sep 17 00:00:00 2001 From: Alessandro Cosentino Date: Sun, 20 May 2012 19:14:34 -0400 Subject: fetching items from remote feed working now --- lib/item.php | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'lib/item.php') 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; + } } -- cgit v1.2.3