summaryrefslogtreecommitdiffstats
path: root/db/item.php
diff options
context:
space:
mode:
authorBernhard Posselt <nukeawhale@gmail.com>2013-09-11 16:42:03 +0200
committerBernhard Posselt <nukeawhale@gmail.com>2013-09-12 01:00:32 +0200
commit09f60e75c90e5734a3b11a0cca944bd42bc41665 (patch)
tree8ecdc41cd6bb7c2b338e8e82b2b1e090b4d82ce4 /db/item.php
parent24cab805e7484a5d206974d05f8de38641435f8c (diff)
#342 implement export
Diffstat (limited to 'db/item.php')
-rw-r--r--db/item.php17
1 files changed, 17 insertions, 0 deletions
diff --git a/db/item.php b/db/item.php
index 1326b65ba..c83da572d 100644
--- a/db/item.php
+++ b/db/item.php
@@ -109,6 +109,23 @@ class Item extends Entity implements IAPI {
}
+ public function toExport($feeds) {
+ return array(
+ 'guid' => $this->getGuid(),
+ 'url' => $this->getUrl(),
+ 'title' => $this->getTitle(),
+ 'author' => $this->getAuthor(),
+ 'pubDate' => $this->getPubDate(),
+ 'body' => $this->getBody(),
+ 'enclosureMime' => $this->getEnclosureMime(),
+ 'enclosureLink' => $this->getEnclosureLink(),
+ 'unread' => $this->isUnread(),
+ 'starred' => $this->isStarred(),
+ 'feedLink' => $feeds['feed'. $this->getFeedId()]->getLink()
+ );
+ }
+
+
public function setAuthor($name) {
parent::setAuthor(strip_tags($name));
}