Пример #1
0
 /**
  * Get an new instance of a forum thread
  * @since Version 3.9.1
  * @return \Railpage\Forums\Thread
  * @param int $thread_id
  */
 public static function CreateThread($thread_id)
 {
     Debug::LogEvent(__METHOD__ . "(" . $thread_id . ")");
     $key = sprintf("railpage:forums.thread=%d", $thread_id);
     if ($Thread = self::load($key)) {
         return $Thread;
     }
     $Thread = new Thread($thread_id);
     self::$Registry->set($key, $Thread);
     return $Thread;
 }