src/Application.php
public function getEntityManager(string $connection = 'default'): EntityManager
    {
        if (!isset($this->entityManager[$connection])) {
            $this->entityManager[$connection] = new EntityManager($this->getConnection($connection));
        }

        return $this->entityManager[$connection];
    }
public function getEntityManager(string $connection = 'default'): EntityManager
    {
        if (!isset($this->entityManager[$connection])) {
            $this->entityManager[$connection] = new EntityManager($this->getConnection($connection));
        }

        return $this->entityManager[$connection];
    }
public function getEntityManager ( string $ connection = 'default' ) : EntityManager { if ( ! isset ( $ this -> entityManager [ $ connection ] ) ) { $ this -> entityManager [ $ connection ] = new EntityManager ( $ this -> getConnection ( $ connection ) ) ; } return $ this -> entityManager [ $ connection ] ; }
Returns an entity manager

@param   string|null $connection (optional) Connection name

@return  EntityManager
Returns an entity manager