code: public function getRepository($className)
      {
          $entityManager = $this->doctrine->getManagerForClass($className);
          if (!$entityManager instanceof EntityManagerInterface) {
              throw new \UnexpectedValueException("No manager found for class {$className}");
          }
          $repository = $entityManager->getRepository($className);
          if (!$repository instanceof EntityRepository) {
              throw new \UnexpectedValueException("No repository found for class {$className}");
          }
  
          return $repository;
      }
docs: @param string $className
  
  @return EntityRepository