ConnectionManager
class ConnectionManager extends ConnectionManager
Redis connection manager.
Traits
Configurable trait.
Properties
protected string | $default | Name of the default connection. | from ConfigurableTrait |
protected array | $configurations | Configurations. | from ConfigurableTrait |
protected array | $connections | Connections. | from ConnectionManager |
Methods
mixed
connect(string $connection)
Connects to the chosen redis configuration and returns the connection.
connection($connection = null)
No description
mixed
executeAndClose(Closure $closure, string|null $connection = null)
Executes the passed closure using the chosen connection before closing it.
from ConnectionManager
mixed
__call(string $name, array $arguments)
Magic shortcut to the default connection.
from ConnectionManager
Details
in ConfigurableTrait at line 35
__construct(string $default, array $configurations)
Constructor.
in ConfigurableTrait at line 48
addConfiguration(string $name, array $configuration)
Adds a configuration.
in ConfigurableTrait at line 59
removeConfiguration(string $name)
Removes a configuration.
It will also remove any active connection linked to the configuration.
at line 28
protected mixed
connect(string $connection)
Connects to the chosen redis configuration and returns the connection.
at line 20
Redis
connection($connection = null)
in ConnectionManager at line 62
close(string|null $connection = null)
Closes the chosen connection.
in ConnectionManager at line 87
mixed
executeAndClose(Closure $closure, string|null $connection = null)
Executes the passed closure using the chosen connection before closing it.
in ConnectionManager at line 116
mixed
__call(string $name, array $arguments)
Magic shortcut to the default connection.