createEntityManager() public static method

Factory method for Doctrine EntityManager
public static createEntityManager ( $admin = FALSE )
Example #1
0
 protected function openController($force = false)
 {
     if ($force || $this->em == null || $this->controller == null || !$this->em->isOpen()) {
         $this->em = Router::createEntityManager(false);
         $this->controller = new EntityController(new Request(), $this->em);
     }
 }
 protected function openController($force = false)
 {
     if ($force || $this->em == null || !$this->em->isOpen()) {
         $this->em = Router::createEntityManager(false);
     }
 }
 /**
  * Create DB connection and setup channel
  */
 static function setupBeforeClass()
 {
     parent::setupBeforeClass();
     self::$em = \Volkszaehler\Router::createEntityManager();
     self::$conn = self::$em->getConnection();
 }