class EntityManagerConfiguration (View source)

EntityManager configuration handler

Properties

protected ObjectManagerInterface $objectManager
protected $settings

Methods

void
injectSettings(array $settings)

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

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

Configure the Doctrine EntityManager according to configuration settings before its creation.

void
registerEventSubscribers(array $configuredSubscribers, EventManager $eventManager)

No description

void
registerEventListeners(array $configuredListeners, EventManager $eventManager)

No description

void
applyDqlSettingsToConfiguration(array $configuredSettings, Configuration $doctrineConfiguration)

Apply configured settings regarding DQL to the Doctrine Configuration.

void
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.

void
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

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

Configure the Doctrine EntityManager according to configuration settings before its creation.

Note that this is called via SignalSlot in {\Neos\Flow\Package} and therefore the arguments are defined by what beforeDoctrineEntityManagerCreation provides (leaving the first argument unused here).

Parameters

Connection $connection
Configuration $config
EventManager $eventManager

Return Value

void

Exceptions

InvalidConfigurationException
IllegalObjectTypeException
NoSuchCacheException

protected void registerEventSubscribers(array $configuredSubscribers, EventManager $eventManager)

No description

Parameters

array $configuredSubscribers
EventManager $eventManager

Return Value

void

Exceptions

IllegalObjectTypeException

protected void registerEventListeners(array $configuredListeners, EventManager $eventManager)

No description

Parameters

array $configuredListeners
EventManager $eventManager

Return Value

void

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 void applyCacheConfiguration(Configuration $config)

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

Parameters

Configuration $config

Return Value

void

Exceptions

NoSuchCacheException

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

Apply configured settings regarding Doctrine's second level cache.

Parameters

array $configuredSettings
Configuration $doctrineConfiguration

Return Value

void

Exceptions

NoSuchCacheException

void enhanceEntityManager(Configuration $config, EntityManager $entityManager)

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

Parameters

Configuration $config
EntityManager $entityManager

Return Value

void

Exceptions

Exception