/**
  * Creates a new article
  * @param  array  $params holds the parameters to be inserted (int author_id, text $article)
  * @return boolean
  */
 public function createArticle($params = array())
 {
     if (!is_array($params) || count($params) < 1) {
         return false;
     }
     $em = $this->getEntityManager();
     $article = new Article();
     $article->setArticleText($params['article']);
     $article->setAuthorId($params['author_id']);
     $article->setCreatedOn(new \DateTime());
     $em->persist($article);
     $em->flush();
     return true;
 }