Exemple #1
0
 public static function create($title, $content, $excerpt, User $user)
 {
     $post = new Post();
     $post->setTitle($title);
     $post->setContent($content);
     $post->setExcerpt($excerpt);
     $post->setUser($user);
     return $post;
 }
 public function getAsPost()
 {
     $post = new Post();
     $post->setTitle($this->getTitle());
     $post->setExcerpt($this->getExcerpt());
     $post->setContent($this->getContent());
     $post->setDate($this->getDate());
     return $post;
 }
 public function setTitle($title)
 {
     $this->__load();
     return parent::setTitle($title);
 }