class DoctrineExtension extends AbstractDoctrineExtension (View source)

DoctrineExtension is an extension for the Doctrine DBAL and ORM library.

Methods

__construct(SymfonyBridgeAdapter $adapter = null)

No description

load(array $configs, ContainerBuilder $container)

{@inheritDoc}

dbalLoad(array $config, ContainerBuilder $container)

Loads the DBAL configuration.

loadDbalConnection(string $name, array $connection, ContainerBuilder $container)

Loads a configured DBAL connection.

getConnectionOptions($connection)

No description

ormLoad(array $config, ContainerBuilder $container)

Loads the Doctrine ORM configuration.

loadOrmEntityManager(array $entityManager, ContainerBuilder $container)

Loads a configured ORM entity manager.

loadOrmEntityManagerMappingInformation(array $entityManager, Definition $ormConfigDef, ContainerBuilder $container)

Loads an ORM entity managers bundle mapping information.

loadOrmSecondLevelCache(array $entityManager, Definition $ormConfigDef, ContainerBuilder $container)

Loads an ORM second level cache bundle mapping information.

getObjectManagerElementName($name)

{@inheritDoc}

getMappingObjectDefaultName()

No description

getMappingResourceExtension()

{@inheritDoc}

loadCacheDriver($driverName, $entityManagerName, array $driverMap, ContainerBuilder $container)

{@inheritDoc}

loadOrmCacheDrivers(array $entityManager, ContainerBuilder $container)

Loads a configured entity managers cache drivers.

loadObjectManagerCacheDriver(array $objectManager, ContainerBuilder $container, $cacheName)

No description

getXsdValidationBasePath()

{@inheritDoc}

getNamespace()

{@inheritDoc}

getConfiguration(array $config, ContainerBuilder $container)

{@inheritDoc}

Details

__construct(SymfonyBridgeAdapter $adapter = null)

Parameters

SymfonyBridgeAdapter $adapter

load(array $configs, ContainerBuilder $container)

{@inheritDoc}

Parameters

array $configs
ContainerBuilder $container

protected dbalLoad(array $config, ContainerBuilder $container)

Loads the DBAL configuration.

Usage example:

 <doctrine:dbal id="myconn" dbname="sfweb" user="root" />

Parameters

array $config An array of configuration settings
ContainerBuilder $container A ContainerBuilder instance

protected loadDbalConnection(string $name, array $connection, ContainerBuilder $container)

Loads a configured DBAL connection.

Parameters

string $name The name of the connection
array $connection A dbal connection configuration.
ContainerBuilder $container A ContainerBuilder instance

protected getConnectionOptions($connection)

Parameters

$connection

protected ormLoad(array $config, ContainerBuilder $container)

Loads the Doctrine ORM configuration.

Usage example:

<doctrine:orm id="mydm" connection="myconn" />

Parameters

array $config An array of configuration settings
ContainerBuilder $container A ContainerBuilder instance

protected loadOrmEntityManager(array $entityManager, ContainerBuilder $container)

Loads a configured ORM entity manager.

Parameters

array $entityManager A configured ORM entity manager.
ContainerBuilder $container A ContainerBuilder instance

protected loadOrmEntityManagerMappingInformation(array $entityManager, Definition $ormConfigDef, ContainerBuilder $container)

Loads an ORM entity managers bundle mapping information.

There are two distinct configuration possibilities for mapping information:

  1. Specify a bundle and optionally details where the entity and mapping information reside.
  2. Specify an arbitrary mapping location.

Parameters

array $entityManager A configured ORM entity manager
Definition $ormConfigDef A Definition instance
ContainerBuilder $container A ContainerBuilder instance

protected loadOrmSecondLevelCache(array $entityManager, Definition $ormConfigDef, ContainerBuilder $container)

Loads an ORM second level cache bundle mapping information.

Parameters

array $entityManager A configured ORM entity manager
Definition $ormConfigDef A Definition instance
ContainerBuilder $container A ContainerBuilder instance

protected getObjectManagerElementName($name)

{@inheritDoc}

Parameters

$name

protected getMappingObjectDefaultName()

protected getMappingResourceConfigDirectory()

{@inheritDoc}

protected getMappingResourceExtension()

{@inheritDoc}

protected loadCacheDriver($driverName, $entityManagerName, array $driverMap, ContainerBuilder $container)

{@inheritDoc}

Parameters

$driverName
$entityManagerName
array $driverMap
ContainerBuilder $container

protected loadOrmCacheDrivers(array $entityManager, ContainerBuilder $container)

Loads a configured entity managers cache drivers.

Parameters

array $entityManager A configured ORM entity manager.
ContainerBuilder $container A ContainerBuilder instance

loadObjectManagerCacheDriver(array $objectManager, ContainerBuilder $container, $cacheName)

Parameters

array $objectManager
ContainerBuilder $container
$cacheName

getXsdValidationBasePath()

{@inheritDoc}

getNamespace()

{@inheritDoc}

getConfiguration(array $config, ContainerBuilder $container)

{@inheritDoc}

Parameters

array $config
ContainerBuilder $container