RedisManager
class RedisManager implements Factory (View source)
Properties
protected Application | $app | The application instance. | |
protected string | $driver | The name of the default driver. | |
protected array | $config | The Redis server configurations. | |
protected mixed | $connections | The Redis connections. | |
protected bool | $events | Indicates whether event dispatcher is set on connections. |
Methods
void | __construct(Application $app, string $driver, array $config) Create a new Redis manager instance. | |
Connection | connection(string $name = null) Get a Redis connection by name. | |
Connection | resolve(string|null $name = null) Resolve the given connection by name. | |
Connection | resolveCluster(string $name) Resolve the given cluster connection by name. | |
Connection | configure(Connection $connection, string $name) Configure the given connection to prepare it for commands. | |
PhpRedisConnector|PredisConnector | connector() Get the connector instance for the current driver. | |
array | connections() Return all of the created connections. | |
void | enableEvents() Enable the firing of Redis command events. | |
void | disableEvents() Disable the firing of Redis command events. | |
mixed | __call(string $method, array $parameters) Pass methods onto the default Redis connection. |
Details
void __construct(Application $app, string $driver, array $config)
Create a new Redis manager instance.
Connection connection(string $name = null)
Get a Redis connection by name.
Connection resolve(string|null $name = null)
Resolve the given connection by name.
protected Connection resolveCluster(string $name)
Resolve the given cluster connection by name.
protected Connection configure(Connection $connection, string $name)
Configure the given connection to prepare it for commands.
protected PhpRedisConnector|PredisConnector connector()
Get the connector instance for the current driver.
array connections()
Return all of the created connections.
void enableEvents()
Enable the firing of Redis command events.
void disableEvents()
Disable the firing of Redis command events.
mixed __call(string $method, array $parameters)
Pass methods onto the default Redis connection.
© Taylor Otwell
Licensed under the MIT License.
Laravel is a trademark of Taylor Otwell.
https://laravel.com/api/5.7/Illuminate/Redis/RedisManager.html