private function getRepository() { if (null === $this->repository) { $this->repository = $this->em->getRepository($this->getClassName()); } return $this->repository; }