summaryrefslogtreecommitdiffstats
path: root/db/item.php
diff options
context:
space:
mode:
authorBernhard Posselt <nukeawhale@gmail.com>2013-03-19 20:32:44 +0100
committerBernhard Posselt <nukeawhale@gmail.com>2013-03-19 20:32:44 +0100
commit50e00916ce1d4536acc2268161135a588fb0c12f (patch)
tree4948a618098435004c9a916a045adf010cd51565 /db/item.php
parent966af078df176fc96d1e37696d4725115ad9639f (diff)
added namespaced indices for the newsapp
Diffstat (limited to 'db/item.php')
-rw-r--r--db/item.php116
1 files changed, 60 insertions, 56 deletions
diff --git a/db/item.php b/db/item.php
index 7d07b337b..ee25ab122 100644
--- a/db/item.php
+++ b/db/item.php
@@ -12,16 +12,69 @@
namespace OCA\News\Db;
+
class Item extends Entity {
+ public $url;
+ public $feed_id;
+ public $guid;
+ public $status;
+ public $title;
+ public $feedTitle;
+
+
+ public function setUrl($url) {
+ $this->url = $url;
+ }
+
+ public function getUrl() {
+ return $this->url;
+ }
+
+ public function setFeedId($feed_id) {
+ $this->feed_id = $feed_id;
+ }
+
+ public function getFeedId() {
+ return $this->feed_id;
+ }
+
+ public function setGUID($guid) {
+ $this->guid = $guid;
+ }
+
+ public function getGUID() {
+ return $this->guid;
+ }
+
+ public function setStatus($status) {
+ $this->status = $status;
+ }
+
+ public function getStatus() {
+ return $this->status;
+ }
+
+ public function getTitle() {
+ return $this->title;
+ }
+
+ public function setTitle($title) {
+ $this->title = $title;
+ }
+
+ public function getFeedTitle() {
+ return $this->feedTitle;
+ }
+
+ public function setFeedTitle($feedtitle) {
+ $this->feedTitle = $feedtitle;
+ }
+
}
-/**
- * This class models an item.
- *
- * It encapsulate a SimplePie_Item object and adds a status flag to it
- */
+
/*class Item {
@@ -50,29 +103,9 @@ class Item extends Entity {
}
}
- public function getFeedId() {
- return $this->feedId;
- }
-
- public function setFeedId($feedId) {
- $this->feedId = $feedId;
- }
-
- public function getGuid() {
- return $this->guid;
- }
- public function setGuid($guid) {
- $this->guid = $guid;
- }
- public function getId() {
- return $this->id;
- }
-
- public function setId($id) {
- $this->id = $id;
- }
+
public function setRead() {
$this->status &= ~StatusFlag::UNREAD;
@@ -97,38 +130,9 @@ class Item extends Entity {
public function isImportant() {
return ($this->status & StatusFlag::IMPORTANT);
}
-
- public function getStatus() {
- return $this->status;
- }
-
- public function setStatus($status) {
- $this->status = $status;
- }
-
- public function getTitle() {
- return $this->title;
- }
-
- public function setTitle($title) {
- $this->title = $title;
- }
- public function getFeedTitle() {
- return $this->feedTitle;
- }
- public function setFeedTitle($feedtitle) {
- $this->feedTitle = $feedtitle;
- }
-
- public function getUrl() {
- return $this->url;
- }
-
- public function setUrl($url) {
- $this->url = $url;
- }
+
public function getBody() {
return $this->body;