diff options
author | Bernhard Posselt <dev@bernhard-posselt.com> | 2014-05-29 22:58:30 +0200 |
---|---|---|
committer | Bernhard Posselt <dev@bernhard-posselt.com> | 2014-05-29 22:58:30 +0200 |
commit | cba949fb0771c832326fc7886cced2bdc37e7536 (patch) | |
tree | 9e1a335a83a6006f645c801b762db7525e4c6c59 /service | |
parent | b91ef01fdbf14c6a5d58e5c471dbb1fc9d17cdfb (diff) |
order by pubdate
Diffstat (limited to 'service')
-rw-r--r-- | service/itemservice.php | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/service/itemservice.php b/service/itemservice.php index 73b1d2322..b34dadad8 100644 --- a/service/itemservice.php +++ b/service/itemservice.php @@ -29,9 +29,9 @@ class ItemService extends Service { private $timeFactory; private $itemMapper; - public function __construct(ItemMapper $itemMapper, + public function __construct(ItemMapper $itemMapper, StatusFlag $statusFlag, - $timeFactory, + $timeFactory, Config $config){ parent::__construct($itemMapper); $this->statusFlag = $statusFlag; @@ -76,28 +76,28 @@ class ItemService extends Service { * @param int $id the id of the feed, 0 for starred or all items * @param int $type the type of the feed * @param int $limit how many items should be returned - * @param int $offset only items lower than this id are returned, 0 for no offset + * @param int $offset the offset * @param boolean $showAll if unread items should also be returned - * @param string $userId the name of the user * @param boolean $oldestFirst if it should be ordered by oldest first + * @param string $userId the name of the user * @return array of items */ - public function findAll($id, $type, $limit, $offset, $showAll, $userId, - $oldestFirst=false){ + public function findAll($id, $type, $limit, $offset, $showAll, $oldestFirst, + $userId){ $status = $this->statusFlag->typeToStatus($type, $showAll); switch($type){ case FeedType::FEED: return $this->itemMapper->findAllFeed( - $id, $limit, $offset,$status, $userId, $oldestFirst + $id, $limit, $offset, $status, $oldestFirst, $userId ); case FeedType::FOLDER: return $this->itemMapper->findAllFolder( - $id, $limit, $offset, $status, $userId, $oldestFirst + $id, $limit, $offset, $status, $oldestFirst, $userId ); default: return $this->itemMapper->findAll( - $limit, $offset, $status, $userId, $oldestFirst + $limit, $offset, $status, $oldestFirst, $userId ); } } |