summaryrefslogtreecommitdiffstats
path: root/db
diff options
context:
space:
mode:
authorAlessandro Cosentino <cosenal@gmail.com>2013-03-02 19:50:33 +0100
committerAlessandro Cosentino <cosenal@gmail.com>2013-03-02 19:50:33 +0100
commit4902253e9c8aac706091c6337391153b02923689 (patch)
tree3012e106d477a83e718ea42741c445895922df8e /db
parent165540d34652fb895cb7f29c818fb3427bfba8c4 (diff)
prototype for business layer for feed
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);
}
/**