static function getDefaultTopic() { $topic = TopicDao::findByName('special'); if (!isset($topic)) { throw new Exception("'special' topic not found!"); } return $topic; }
static function getTopic($line) { $topicName = substr($line, strlen(self::TOPIC_DELIMITER)); $topic = TopicDao::findByName($topicName); if (!isset($topic)) { TopicService::createTopic($topicName); $topic = TopicDao::findByName($topicName); } return $topic; }