summaryrefslogtreecommitdiffstats
path: root/db
diff options
context:
space:
mode:
Diffstat (limited to 'db')
-rw-r--r--db/feed.php10
-rw-r--r--db/folder.php5
-rw-r--r--db/foldermapper.php2
3 files changed, 15 insertions, 2 deletions
diff --git a/db/feed.php b/db/feed.php
index 0f2e861b7..48f379a1b 100644
--- a/db/feed.php
+++ b/db/feed.php
@@ -71,5 +71,15 @@ class Feed extends Collection {
public function getFolderId(){
return $this->folderId;
}
+
+ public function jsonSerialize(){
+ //TODO: this is just for test
+ $encoding = array(
+ 'id' => $this->getId(),
+ 'url' => $this->getUrl(),
+ 'title' => $this->getTitle()
+ );
+ return $encoding;
+ }
}
diff --git a/db/folder.php b/db/folder.php
index 2e3c96a7c..23d33737f 100644
--- a/db/folder.php
+++ b/db/folder.php
@@ -71,6 +71,9 @@ class Folder extends Collection {
return $this->children;
}
-
+ public function jsonSerialize() {
+ //TODO: this is just for test
+ return $this->name;
+ }
} \ No newline at end of file
diff --git a/db/foldermapper.php b/db/foldermapper.php
index 5c1cd1552..52504ea6e 100644
--- a/db/foldermapper.php
+++ b/db/foldermapper.php
@@ -60,7 +60,7 @@ class FolderMapper {
* @returns
*/
public function getAll() {
- return self::childrenOf(0);
+ return $this->childrenOf(0);
}
/**