protected function getPostData(Post $post) { return array('comment_type' => 'comment', 'comment_author' => $post->getAuthorName(), 'comment_content' => $post->getMessage()); }
public function persistPost(Post $post, Response $response) { if ($this->isAnonymous()) { $response->headers->setCookie(new Cookie($this->cookieName, urlencode($post->getAuthorName()), time() + 15552000)); } }