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 27
protected mixed
createPoolProxy(string $driver, Closure $createCallback, PoolDefinition $definition, string $proxyClass)
Create a pool proxy for an immutable definition.
at line 48
protected PoolDefinition
poolDefinition(string $resource, array $poolConfig, array $fingerprintSource)
Build a namespaced pool definition for a pooled resource.
at line 66
abstract protected Factory
poolFactory()
Get the pool factory used by this manager.
at line 74
HasPoolProxy
setReleaseCallback(string $driver, Closure $callback)
Set the release callback for a pooled driver.
Boot-only. The callback persists on the manager for the worker lifetime and is captured by every subsequently created proxy for the driver.
at line 84
Closure|null
getReleaseCallback(string $driver)
Get the release callback for a pooled driver.
at line 96
HasPoolProxy
addPoolableDriver(string $driver)
Add a driver to the poolable-driver list.
Boot-only. 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 112
HasPoolProxy
removePoolableDriver(string $driver)
Remove a driver from the poolable-driver list.
Boot-only. 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 129
array
getPoolableDrivers()
Get the poolable-driver list.
at line 141
HasPoolProxy
setPoolableDrivers(array $poolableDrivers)
Set the poolable-driver list.
Boot-only. 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.