Connection
class Connection extends Connection
A simple pooled connection that uses a callback to create connections.
Properties
| protected float | $lastUseTime | from Connection | |
| protected float | $lastReleaseTime | from Connection | |
| protected bool | $invalid | from Connection | |
| protected callable | $callback | ||
| protected mixed | $connection |
Methods
mixed
getActiveConnection()
Get the active connection, reconnecting if necessary.
bool
reconnect()
Reconnect the connection.
bool
close()
Close the connection.
Details
at line 22
__construct(Container $container, PoolInterface $pool, callable $callback)
No description
in
Connection at line 49
void
release()
Release the connection back to the pool.
in
Connection at line 68
void
discard()
Discard the connection from its pool.
in
Connection at line 76
mixed
getConnection()
Get the underlying connection, with retry on failure.
in
Connection at line 90
bool
check()
Check if the connection is still valid based on idle time.
in
Connection at line 109
float
getLastUseTime()
Get the last use time.
in
Connection at line 117
float
getLastReleaseTime()
Get the last release time.
in
Connection at line 125
protected void
markInvalid()
Mark the connection as invalid.
in
Connection at line 133
protected void
markValid()
Mark the connection as valid.
at line 32
mixed
getActiveConnection()
Get the active connection, reconnecting if necessary.
at line 41
bool
reconnect()
Reconnect the connection.
at line 49
bool
close()
Close the connection.