public function exist($topic, $id) { $topics = $this->getTopics($topic); return isset($topics[$id]); }