Drest\Service::getEntityManager PHP Méthode

getEntityManager() public méthode

Get the entity manager This will return the default manager, to choose a specific one use getEntityManagerRegistry()
public getEntityManager ( ) : EntityManager
Résultat Doctrine\ORM\EntityManager $em
    public function getEntityManager()
    {
        return $this->getEntityManagerRegistry()->getManager();
    }

Usage Example

 /**
  * Get the entity manager from the service object
  * @return \Doctrine\ORM\EntityManager $em
  */
 protected function getEntityManager()
 {
     return $this->service->getEntityManager();
 }