Drest\Service::getEntityManager PHP Method

getEntityManager() public method

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

Usage Example

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