class EntityManagerConfiguration (View source)

EntityManager configuration handler

Properties

protected ObjectManagerInterface $objectManager
protected array $settings

Methods

void
injectSettings(array $settings)

Injects the Flow settings, the persistence part is kept for further use.

configureEntityManager(Connection $connection, Configuration $config, EventManager $eventManager)

Configure the Doctrine EntityManager according to configuration settings before it's creation.

enableSqlLogger(string $configuredSqlLogger, Configuration $doctrineConfiguration)

No description

registerEventSubscribers(array $configuredSubscribers, EventManager $eventManager)

No description

registerEventListeners(array $configuredListeners, EventManager $eventManager)

No description

void
applyDqlSettingsToConfiguration(array $configuredSettings, Configuration $doctrineConfiguration)

Apply configured settings regarding DQL to the Doctrine Configuration.

applyCacheConfiguration(Configuration $config)

Apply basic cache configuration for the metadata, query and result caches.

void
applySecondLevelCacheSettingsToConfiguration(array $configuredSettings, Configuration $doctrineConfiguration)

Apply configured settings regarding Doctrine's second level cache.

enhanceEntityManager(Configuration $config, EntityManager $entityManager)

Enhance the Doctrine EntityManager by applying post creation settings, like custom filters.

Details

void injectSettings(array $settings)

Injects the Flow settings, the persistence part is kept for further use.

Parameters

array $settings

Return Value

void

Exceptions

InvalidConfigurationException

configureEntityManager(Connection $connection, Configuration $config, EventManager $eventManager)

Configure the Doctrine EntityManager according to configuration settings before it's creation.

Parameters

Connection $connection
Configuration $config
EventManager $eventManager

Exceptions

InvalidConfigurationException
IllegalObjectTypeException

protected enableSqlLogger(string $configuredSqlLogger, Configuration $doctrineConfiguration)

No description

Parameters

string $configuredSqlLogger
Configuration $doctrineConfiguration

Exceptions

InvalidConfigurationException

protected registerEventSubscribers(array $configuredSubscribers, EventManager $eventManager)

No description

Parameters

array $configuredSubscribers
EventManager $eventManager

Exceptions

IllegalObjectTypeException

protected registerEventListeners(array $configuredListeners, EventManager $eventManager)

No description

Parameters

array $configuredListeners
EventManager $eventManager

protected void applyDqlSettingsToConfiguration(array $configuredSettings, Configuration $doctrineConfiguration)

Apply configured settings regarding DQL to the Doctrine Configuration.

At the moment, these are custom DQL functions.

Parameters

array $configuredSettings
Configuration $doctrineConfiguration

Return Value

void

protected applyCacheConfiguration(Configuration $config)

Apply basic cache configuration for the metadata, query and result caches.

Parameters

Configuration $config

protected void applySecondLevelCacheSettingsToConfiguration(array $configuredSettings, Configuration $doctrineConfiguration)

Apply configured settings regarding Doctrine's second level cache.

Parameters

array $configuredSettings
Configuration $doctrineConfiguration

Return Value

void

enhanceEntityManager(Configuration $config, EntityManager $entityManager)

Enhance the Doctrine EntityManager by applying post creation settings, like custom filters.

Parameters

Configuration $config
EntityManager $entityManager

Exceptions

DBALException