public function addAction()
 {
     $questionForm = new QuestionForm();
     $request = $this->getRequest();
     if ($request->isPost()) {
         $qs = new Question();
         $qs->setQuestionAuthor($request->getPost('question_author'));
         $qs->setQuestionAuthorEmail($request->getPost('question_author_email'));
         $qs->setQuestionTitle($request->getPost('question_title'));
         $qs->setQuestionDate(new \DateTime('now'));
         $qs->setQuestionAuthorIp($_SERVER['REMOTE_ADDR']);
         $this->getEntityManager()->persist($qs);
         $this->getEntityManager()->flush();
         $this->flashMessenger()->addInfoMessage("Pergunta registrada com sucesso. Você receberá uma notificação por email quando a mesma for respondida!");
         return $this->redirect()->toRoute('questions');
     }
     return new ViewModel(array('questionForm' => $questionForm));
 }
 /**
  * {@inheritDoc}
  */
 public function setQuestionAuthorIp($questionAuthorIp)
 {
     $this->__initializer__ && $this->__initializer__->__invoke($this, 'setQuestionAuthorIp', array($questionAuthorIp));
     return parent::setQuestionAuthorIp($questionAuthorIp);
 }