summaryrefslogtreecommitdiffstats
path: root/bl/itembl.php
diff options
context:
space:
mode:
authorBernhard Posselt <nukeawhale@gmail.com>2013-03-21 20:38:09 +0100
committerBernhard Posselt <nukeawhale@gmail.com>2013-03-21 20:38:20 +0100
commitc8bdd9c3fb0ab872b868c151f052748235601653 (patch)
treeaf4ffc33ad013f817af14aed25e54606429ad612 /bl/itembl.php
parentd692600a31bf4aa9be8b71d8fcb16e90e9393aea (diff)
finished feedcontroller
Diffstat (limited to 'bl/itembl.php')
-rw-r--r--bl/itembl.php29
1 files changed, 23 insertions, 6 deletions
diff --git a/bl/itembl.php b/bl/itembl.php
index 7dee2318f..f2b1ac1b3 100644
--- a/bl/itembl.php
+++ b/bl/itembl.php
@@ -37,22 +37,39 @@ class ItemBl extends Bl {
public function findAll(){
-
+ // TODO all the crazy finding of items
}
- public function finStarred(){
+ public function starredCount($userId){
+ return $this->mapper->starredCount($userId);
+ }
+
+ public function star($itemId, $isStarred, $userId){
+ $item = $this->find($itemId, $userId);
+ if($isStarred){
+ $item->setStarred();
+ } else {
+ $item->setUnstarred();
+ }
+ $this->mapper->update($item);
}
- public function star(){
-
+ public function read($itemId, $isRead, $userId){
+ $item = $this->find($itemId, $userId);
+ if($isRead){
+ $item->setRead();
+ } else {
+ $item->setUnread();
+ }
+ $this->mapper->update($item);
}
- public function read(){
-
+ public function readFeed($feedId, $userId){
+ $this->mapper->readFeed($feedId, $userId);
}
}