public function addRating(User $user, $clientIp, $rating)
 {
     $date = new \DateTime();
     $ratin = new Ratin();
     $ratin->setDate($date);
     $ratin->setIpAdress($clientIp);
     $ratin->setRating($rating);
     $ratin->setUserId($user);
     $this->getEntityManager()->persist($ratin);
     $this->getEntityManager()->flush();
     return true;
 }
 /**
  * {@inheritDoc}
  */
 public function getUserId()
 {
     $this->__initializer__ && $this->__initializer__->__invoke($this, 'getUserId', []);
     return parent::getUserId();
 }