public function find($documentName, $identifier, $lockMode = LockMode::NONE, $lockVersion = null) { return $this->getRepository($documentName)->find($identifier, $lockMode, $lockVersion); }
/** * @param string $id * @return Recipe * @throws NotFoundException If no Recipe found */ public function find($id) { $recipe = $this->dm->find('Hellofresh\\DoctrineTutorial\\Menu\\Recipe', $id); if (!$recipe) { throw new NotFoundException("Recipe not found"); } return $recipe; }