public function findById($id)
 {
     $er = $this->em->getRepository($this->options->getUserEntityClass());
     return $er->find($id);
 }
 public function __construct(DocumentManager $dm, ModuleOptions $options)
 {
     $this->dm = $dm;
     $this->options = $options;
     $this->entityClass = $this->options->getUserEntityClass();
 }
예제 #3
0
 public function findFirst()
 {
     $er = $this->em->getRepository($this->options->getUserEntityClass());
     return isset($er->findAll()[0]) ? $er->findAll()[0] : array();
 }