Example #1
0
 /**
  * Sets the target topic. Also reads the topic subject and the last post pointer
  * from the target object.
  *
  * @param Topic $topic The target topic.
  *
  * @return void
  */
 public function setTarget(Topic $topic)
 {
     $this->target = $topic;
     $this->lastPost = $topic->getLastPost();
     $this->lastPostCrdate = $this->lastPost->getTimestamp();
     $this->subject = $topic->getSubject();
 }