コード例 #1
0
ファイル: UserMongoDB.php プロジェクト: czester90/gowithme
 public function findById($id)
 {
     $dm = $this->getDocumentManager();
     $class = $this->options->getUserEntityClass();
     $user = $dm->getRepository($class)->findOneBy(array('id' => $id));
     return $user;
 }
コード例 #2
0
ファイル: User.php プロジェクト: czester90/gowithme
 public function findById($id)
 {
     $er = $this->em->getRepository($this->options->getUserEntityClass());
     return $er->find($id);
 }