diff options
author | Alessandro <acosenti@malutchosky.(none)> | 2012-06-02 11:40:35 -0400 |
---|---|---|
committer | Alessandro <acosenti@malutchosky.(none)> | 2012-06-02 11:40:35 -0400 |
commit | 3f35d59911ea3e90c4a47249b4a9e7ca49de2cdb (patch) | |
tree | c3d0bb3ea07eca40dec65158c9477eb13e33ea08 /lib/item.php | |
parent | e10cdc67c446e768bc4ef8e0b2a73a3def59bcca (diff) |
adds delete functions in the mapper
Diffstat (limited to 'lib/item.php')
-rw-r--r-- | lib/item.php | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/lib/item.php b/lib/item.php index e048e9d11..ad78f07e2 100644 --- a/lib/item.php +++ b/lib/item.php @@ -28,11 +28,11 @@ class StatusFlag{ const Updated = 0x16; } -/* -* This class models an item. -* -* It encapsulate a SimplePie_Item object and adds a status flag to it -*/ +/** + * This class models an item. + * + * It encapsulate a SimplePie_Item object and adds a status flag to it + */ class OC_News_Item { private $url; @@ -76,6 +76,18 @@ class OC_News_Item { public function isRead(){ return ($this->status & ~StatusFlag::Unread); } + + public function isImportant(){ + return ($this->status & StatusFlag::Important); + } + + /** + * NOTE: this is needed to store items in the database, otherwise + * the status of an item should be retrieved with methods: isRead(), isImportant(), ... + */ + public function getStatus(){ + return $this->status; + } public function getTitle(){ return $this->title; |