/** * @inheritDoc */ public function getPosts(PostQuery $postQuery) { $repo = $this->repositories->posts(); $limit = $postQuery->getSeek()->getLimit(); $offset = $postQuery->getSeek()->getOffset(); $order = ['id' => 'desc']; $criteria = ['thread' => $postQuery->getThreadId()]; return $repo->findBy($criteria, $order, $limit, $offset); }