summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorAlessandro Cosentino <cosenal@gmail.com>2012-05-08 19:23:00 -0400
committerAlessandro Cosentino <cosenal@gmail.com>2012-05-08 19:23:00 -0400
commit2ad605cb3a80546695b7d9cac3306a045f0bbae6 (patch)
treeb461aab52c8d2d60089764fd656f7464b1969160 /lib
parentbb29f28e99a499475258afec3008f9bd94e973d7 (diff)
the OC_News_Item class now extends the SimplePie item class
Diffstat (limited to 'lib')
-rw-r--r--lib/item.php17
1 files changed, 8 insertions, 9 deletions
diff --git a/lib/item.php b/lib/item.php
index 6a18ded1c..528dd5487 100644
--- a/lib/item.php
+++ b/lib/item.php
@@ -22,25 +22,24 @@
class StatusFlag{
- const Unread = 0x02;
+ const Unread = 0x02;
const Important = 0x04;
- const Deleted = 0x08;
- const Updated = 0x16;
+ const Deleted = 0x08;
+ const Updated = 0x16;
}
/*
-* This class models an item
+* This class models an item.
*
-* It wraps a SimplePie item and adds a status flag to it
+* It extends the SimplePie_Item class by adding a status flag to it
*/
-class OC_News_Item{
+class OC_News_Item extends SimplePie_Item {
- private $spitem; //the SimplePie item
private $status; //a bit-field set with status flags
- public function __construct($spitem){
- $this->spitem = $spitem;
+ public function __construct($feed, $data){
$this->status |= StatusFlag::Unread;
+ parent::__construct($feed, $data);
}
public function setRead(){