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 setContent($content) { $this->__load(); return parent::setContent($content); }