public function getAsComment() { $comment = new Comment(); $comment->setText($this->getText()); $comment->setDate($this->getDate()); $comment->setCommenter($this->getCommenter()); return $comment; }
public static function create($text, Commenter $c, Post $p) { $comment = new Comment(); $comment->setText($text); $comment->setCommenter($c); $comment->setPost($p); return $comment; }
public function setText($text) { $this->__load(); return parent::setText($text); }