/**
  * @param string $value
  *
  * @return bool
  */
 protected function query($value)
 {
     $class = $this->entityOptions->getUser();
     /** @var \PServerCore\Entity\UserInterface $user */
     $user = new $class();
     $user->setUsername($value);
     return $this->gameBackendService->isUserNameExists($user);
 }
Exemplo n.º 2
0
 /**
  * @param $userId
  *
  * @return null|\PServerCore\Entity\UserInterface
  */
 protected function getUser4Id($userId)
 {
     /** @var \PServerCore\Entity\Repository\User $userRepository */
     $userRepository = $this->entityManager->getRepository($this->entityOptions->getUser());
     return $userRepository->getUser4Id($userId);
 }
Exemplo n.º 3
0
 /**
  * @return \PServerCore\Entity\Repository\DonateLog
  */
 protected function getDonateLogEntity()
 {
     return $this->entityManager->getRepository($this->entityOptions->getDonateLog());
 }
Exemplo n.º 4
0
 /**
  * @return \PServerCore\Entity\Repository\SecretQuestion $repository
  */
 protected function getQuestionRepository()
 {
     return $this->entityManager->getRepository($this->entityOptions->getSecretQuestion());
 }
Exemplo n.º 5
0
 /**
  * @return \PServerCore\Entity\Repository\ServerInfo
  */
 protected function getServerInfoRepository()
 {
     /** @var \PServerCore\Entity\Repository\ServerInfo $repository */
     $repository = $this->entityManager->getRepository($this->entityOptions->getServerInfo());
     return $repository;
 }
Exemplo n.º 6
0
 /**
  * @return \PServerCore\Entity\Repository\DownloadList
  */
 protected function getDownloadRepository()
 {
     return $this->entityManager->getRepository($this->entityOptions->getDownloadList());
 }
Exemplo n.º 7
0
 /**
  * @param UserInterface $user
  * @return \PServerCore\Entity\LoginHistory[]
  */
 public function getHistoryList4User(UserInterface $user)
 {
     /** @var \PServerCore\Entity\Repository\LoginHistory $repository */
     $repository = $this->entityManager->getRepository($this->entityOptions->getLoginHistory());
     return $repository->getLastLoginList4User($user);
 }
Exemplo n.º 8
0
 /**
  * @return \Doctrine\ORM\QueryBuilder
  */
 public function getLogDataSource()
 {
     /** @var \PServerCore\Entity\Repository\Logs $repository */
     $repository = $this->entityManager->getRepository($this->entityOptions->getLogs());
     return $repository->getLogQueryBuilder();
 }