public function configureEntityManager(Connection $connection, Configuration $config, EventManager $eventManager)
    {
        if (isset($this->settings['doctrine']['sqlLogger']) && is_string($this->settings['doctrine']['sqlLogger']) && class_exists($this->settings['doctrine']['sqlLogger'])) {
            $this->enableSqlLogger($this->settings['doctrine']['sqlLogger'], $config);
        }

        if (isset($this->settings['doctrine']['eventSubscribers']) && is_array($this->settings['doctrine']['eventSubscribers'])) {
            $this->registerEventSubscribers($this->settings['doctrine']['eventSubscribers'], $eventManager);
        }

        if (isset($this->settings['doctrine']['eventListeners']) && is_array($this->settings['doctrine']['eventListeners'])) {
            $this->registerEventListeners($this->settings['doctrine']['eventListeners'], $eventManager);
        }

        $this->applyCacheConfiguration($config);

        if (isset($this->settings['doctrine']['secondLevelCache']) && is_array($this->settings['doctrine']['secondLevelCache'])) {
            $this->applySecondLevelCacheSettingsToConfiguration($this->settings['doctrine']['secondLevelCache'], $config);
        }

        if (isset($this->settings['doctrine']['dql']) && is_array($this->settings['doctrine']['dql'])) {
            $this->applyDqlSettingsToConfiguration($this->settings['doctrine']['dql'], $config);
        }
    }
public function configureEntityManager(Connection $connection, Configuration $config, EventManager $eventManager)
    {
        if (isset($this->settings['doctrine']['sqlLogger']) && is_string($this->settings['doctrine']['sqlLogger']) && class_exists($this->settings['doctrine']['sqlLogger'])) {
            $this->enableSqlLogger($this->settings['doctrine']['sqlLogger'], $config);
        }

        if (isset($this->settings['doctrine']['eventSubscribers']) && is_array($this->settings['doctrine']['eventSubscribers'])) {
            $this->registerEventSubscribers($this->settings['doctrine']['eventSubscribers'], $eventManager);
        }

        if (isset($this->settings['doctrine']['eventListeners']) && is_array($this->settings['doctrine']['eventListeners'])) {
            $this->registerEventListeners($this->settings['doctrine']['eventListeners'], $eventManager);
        }

        $this->applyCacheConfiguration($config);

        if (isset($this->settings['doctrine']['secondLevelCache']) && is_array($this->settings['doctrine']['secondLevelCache'])) {
            $this->applySecondLevelCacheSettingsToConfiguration($this->settings['doctrine']['secondLevelCache'], $config);
        }

        if (isset($this->settings['doctrine']['dql']) && is_array($this->settings['doctrine']['dql'])) {
            $this->applyDqlSettingsToConfiguration($this->settings['doctrine']['dql'], $config);
        }
    }
public function configureEntityManager ( Connection $ connection , Configuration $ config , EventManager $ eventManager ) { if ( isset ( $ this -> settings [ 'doctrine' ] [ 'sqlLogger' ] ) && is_string ( $ this -> settings [ 'doctrine' ] [ 'sqlLogger' ] ) && class_exists ( $ this -> settings [ 'doctrine' ] [ 'sqlLogger' ] ) ) { $ this -> enableSqlLogger ( $ this -> settings [ 'doctrine' ] [ 'sqlLogger' ] , $ config ) ; } if ( isset ( $ this -> settings [ 'doctrine' ] [ 'eventSubscribers' ] ) && is_array ( $ this -> settings [ 'doctrine' ] [ 'eventSubscribers' ] ) ) { $ this -> registerEventSubscribers ( $ this -> settings [ 'doctrine' ] [ 'eventSubscribers' ] , $ eventManager ) ; } if ( isset ( $ this -> settings [ 'doctrine' ] [ 'eventListeners' ] ) && is_array ( $ this -> settings [ 'doctrine' ] [ 'eventListeners' ] ) ) { $ this -> registerEventListeners ( $ this -> settings [ 'doctrine' ] [ 'eventListeners' ] , $ eventManager ) ; } $ this -> applyCacheConfiguration ( $ config ) ; if ( isset ( $ this -> settings [ 'doctrine' ] [ 'secondLevelCache' ] ) && is_array ( $ this -> settings [ 'doctrine' ] [ 'secondLevelCache' ] ) ) { $ this -> applySecondLevelCacheSettingsToConfiguration ( $ this -> settings [ 'doctrine' ] [ 'secondLevelCache' ] , $ config ) ; } if ( isset ( $ this -> settings [ 'doctrine' ] [ 'dql' ] ) && is_array ( $ this -> settings [ 'doctrine' ] [ 'dql' ] ) ) { $ this -> applyDqlSettingsToConfiguration ( $ this -> settings [ 'doctrine' ] [ 'dql' ] , $ config ) ; } }
Configure the Doctrine EntityManager according to configuration settings before it's creation.

@param Connection $connection
@param Configuration $config
@param EventManager $eventManager
@throws InvalidConfigurationException
@throws IllegalObjectTypeException
Configure the Doctrine EntityManager according to configuration settings before it s creation .