/**
  * @param string $email
  * @param string $password
  * @param string $confirmPassword
  * @throws \Likedimion\Exception\AccountServiceException
  * @internal param string $login
  * @return bool
  */
 public function registration($email, $password, $confirmPassword = "")
 {
     if ($password == $confirmPassword) {
         $account = new Account();
         $account->setLogin($email);
         $account->setPassword($password);
         $account->setEmail($email);
         try {
             $findAccount = $this->getRepository()->findByLogin($email);
             $findAccountEmail = $this->getRepository()->findByEmail($email);
             throw new AccountServiceException("login_already_exists");
         } catch (EntityNotFoundException $e) {
             $this->getRepository()->save($account);
             return true;
         }
     } else {
         throw new AccountServiceException("passwords_not_confirm");
     }
 }
 /**
  * {@inheritDoc}
  */
 public function setLogin($login)
 {
     $this->__initializer__ && $this->__initializer__->__invoke($this, 'setLogin', array($login));
     return parent::setLogin($login);
 }