PHP Class AppserverIo\Appserver\PersistenceContainer\Doctrine\V2\EntityManagerFactory

Show file Open project: appserver-io/appserver Class Usage Examples

Public Methods

Method Description
factory ( AppserverIo\Psr\Application\ApplicationInterface $application, AppserverIo\Appserver\Core\Api\Node\PersistenceUnitNodeInterface $persistenceUnitNode ) : object Creates a new entity manager instance based on the passed configuration.
getCacheImpl ( AppserverIo\Appserver\Core\Api\Node\PersistenceUnitNodeInterface $persistenceUnit, AppserverIo\Appserver\PersistenceContainer\Doctrine\V2\CacheFactories\CacheConfigurationNodeInterface $cacheConfiguration ) : CacheProvider Factory method to create a new cache instance from the passed configuration.

Method Details

factory() public static method

Creates a new entity manager instance based on the passed configuration.
public static factory ( AppserverIo\Psr\Application\ApplicationInterface $application, AppserverIo\Appserver\Core\Api\Node\PersistenceUnitNodeInterface $persistenceUnitNode ) : object
$application AppserverIo\Psr\Application\ApplicationInterface The application instance to create the entity manager for
$persistenceUnitNode AppserverIo\Appserver\Core\Api\Node\PersistenceUnitNodeInterface The datasource configuration
return object The entity manager instance

getCacheImpl() public static method

Factory method to create a new cache instance from the passed configuration.
public static getCacheImpl ( AppserverIo\Appserver\Core\Api\Node\PersistenceUnitNodeInterface $persistenceUnit, AppserverIo\Appserver\PersistenceContainer\Doctrine\V2\CacheFactories\CacheConfigurationNodeInterface $cacheConfiguration ) : CacheProvider
$persistenceUnit AppserverIo\Appserver\Core\Api\Node\PersistenceUnitNodeInterface The persistence unit node
$cacheConfiguration AppserverIo\Appserver\PersistenceContainer\Doctrine\V2\CacheFactories\CacheConfigurationNodeInterface The cache configuration
return Doctrine\Common\Cache\CacheProvider The cache instance