public function getUsersOld() { // The old fashioned way (typical doctrine use) $entityManager = \erdiko\doctrine\EntityManager::getEntityManager(); return $entityManager->getRepository('app\\entities\\User')->findAll(); }
/** * getRepository * * @param string $entityName, the name of the entity * @param string $db, name of the db to connect to * @return \Doctrine\ORM\EntityRepository The repository class */ public function getRepository($entityName, $db = null) { return \erdiko\doctrine\EntityManager::getEntityManager()->getRepository($entityName); }