HasPoolProxy
trait HasPoolProxy
Hosts must declare a protected array $poolableDrivers containing their default poolable drivers.
Properties
| protected Closure> | $releaseCallbacks |
Methods
Create a pool proxy for an immutable definition.
Build a namespaced pool definition for a pooled resource.
Get the pool factory used by this manager.
Get the release callback for a pooled driver.
Add a driver to the poolable-driver list.
Remove a driver from the poolable-driver list.
Get the poolable-driver list.
Set the poolable-driver list.
Details
at line 28
protected mixed
createPoolProxy(string $driver, Closure $createCallback, PoolDefinition $definition, string $proxyClass)
Create a pool proxy for an immutable definition.
at line 49
protected PoolDefinition
poolDefinition(string $resource, array $poolConfig, array $fingerprintSource)
Build a namespaced pool definition for a pooled resource.
at line 67
abstract protected Factory
poolFactory()
Get the pool factory used by this manager.
at line 75
HasPoolProxy
setReleaseCallback(string $driver, Closure $callback)
Set the release callback for a pooled driver.
The callback persists on the shared manager for the worker lifetime and is captured by every subsequently created proxy for the driver.
at line 86
Closure|null
getReleaseCallback(string $driver)
Get the release callback for a pooled driver.
at line 98
HasPoolProxy
addPoolableDriver(string $driver)
Add a driver to the poolable-driver list.
The list persists on the manager for the worker lifetime and is consulted on subsequent driver creation. Per-request use races across coroutines and does not affect already-cached drivers.
at line 115
HasPoolProxy
removePoolableDriver(string $driver)
Remove a driver from the poolable-driver list.
The list persists on the manager for the worker lifetime and is consulted on subsequent driver creation. Per-request use races across coroutines and does not affect already-cached drivers.
at line 133
array
getPoolableDrivers()
Get the poolable-driver list.
at line 145
HasPoolProxy
setPoolableDrivers(array $poolableDrivers)
Set the poolable-driver list.
The list persists on the manager for the worker lifetime and is consulted on subsequent driver creation. Per-request use races across coroutines and does not affect already-cached drivers.