Beispiel #1
0
 static function getDefaultTopic()
 {
     $topic = TopicDao::findByName('special');
     if (!isset($topic)) {
         throw new Exception("'special' topic not found!");
     }
     return $topic;
 }
Beispiel #2
0
 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;
 }