Exemplo n.º 1
0
 public function getAsComment()
 {
     $comment = new Comment();
     $comment->setText($this->getText());
     $comment->setDate($this->getDate());
     $comment->setCommenter($this->getCommenter());
     return $comment;
 }
Exemplo n.º 2
0
 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);
 }