Lease
class Lease
Properties
| protected bool | $finalized |
Methods
__construct(ObjectPool $pool, object $object, Closure|null $releaseCallback = null)
Create a lease for one checked-out object.
object
get()
Get the borrowed object.
void
release()
Run reset behavior and return the object to the pool.
void
discard()
Destroy the borrowed object instead of returning it to the pool.
__destruct()
Finalize an abandoned lease without letting cleanup failures escape.
Details
at line 21
__construct(ObjectPool $pool, object $object, Closure|null $releaseCallback = null)
Create a lease for one checked-out object.
at line 31
object
get()
Get the borrowed object.
at line 43
void
release()
Run reset behavior and return the object to the pool.
at line 71
void
discard()
Destroy the borrowed object instead of returning it to the pool.
at line 84
__destruct()
Finalize an abandoned lease without letting cleanup failures escape.