EntityManagerPool
in package
FinalYes
Tags
Table of Contents
Methods
- __construct() : mixed
- close() : void
- name() : string
- release() : void
- stats() : EmPoolStats
- take() : PooledEntityManager
- withEntityManager() : T
Methods
__construct()
public
__construct(string $name, EntityManagerFactory $factory, ConnectionPool $connPool, EmPoolConfig $config, Channel<string|int, PooledEntityManager> $channel[, EventDispatcherInterface|null $events = null ][, LoggerInterface $logger = new NullLogger() ]) : mixed
Parameters
- $name : string
- $factory : EntityManagerFactory
- $connPool : ConnectionPool
- $config : EmPoolConfig
- $channel : Channel<string|int, PooledEntityManager>
- $events : EventDispatcherInterface|null = null
- $logger : LoggerInterface = new NullLogger()
close()
public
close(Duration $timeout) : void
Parameters
- $timeout : Duration
Tags
name()
public
name() : string
Return values
stringrelease()
public
release(PooledEntityManager $em) : void
Parameters
- $em : PooledEntityManager
stats()
public
stats() : EmPoolStats
Return values
EmPoolStatstake()
public
take([Duration|null $timeout = null ]) : PooledEntityManager
Parameters
- $timeout : Duration|null = null
Return values
PooledEntityManagerwithEntityManager()
public
withEntityManager(callable(EntityManagerInterface): T $fn) : T
Parameters
- $fn : callable(EntityManagerInterface): T