class DoctrineServiceProvider implements ServiceProviderInterface (View source)

Register Doctrine services for dependency injection container.

Methods

Cache
getManuallyDefinedCache(array $cacheConfig, string $namespace = 'dc2', bool $isPreview = false, string $environment = 'prod')

Get cache driver according to config.yml entry.

string
getNamespace(string $namespace = 'dc2', bool $isPreview = false, string $environment = 'prod')

No description

Container
register(Container $container)

Initialize Doctrine entity manager in DI container.

Details

protected Cache getManuallyDefinedCache(array $cacheConfig, string $namespace = 'dc2', bool $isPreview = false, string $environment = 'prod')

Get cache driver according to config.yml entry.

Logic from Doctrine setup method https://github.com/doctrine/doctrine2/blob/master/lib/Doctrine/ORM/Tools/Setup.php#L122

Parameters

array $cacheConfig
string $namespace
bool $isPreview
string $environment

Return Value

Cache

string getNamespace(string $namespace = 'dc2', bool $isPreview = false, string $environment = 'prod')

Parameters

string $namespace
bool $isPreview
string $environment

Return Value

string

Container register(Container $container)

Initialize Doctrine entity manager in DI container.

This method can be called from InstallApp after updating doctrine configuration.

Parameters

Container $container [description]

Return Value

Container