summaryrefslogtreecommitdiffstats
path: root/bl/itembl.php
diff options
context:
space:
mode:
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);
}
}