/**
  * {@inheritdoc}
  */
 public function findOneBy(array $criteria)
 {
     try {
         return $this->unstableRepository->findOneBy($criteria);
     } catch (\Exception $exception) {
         return $this->fallbackRepository->findOneBy($criteria);
     }
 }
示例#2
0
 /**
  * @Transform :theme
  * @Transform /^"([^"]+)" theme$/
  * @Transform /^theme "([^"]+)"$/
  */
 public function getThemeByThemeTitle($themeTitle)
 {
     return $this->themeRepository->findOneBy(['title' => $themeTitle]);
 }