redis\Connection initConnection()

initConnection() protected method Initializes the DB connection. This method is invoked right after the DB connection is established. The default implementation triggers an EVENT_AFTER_OPEN event. protected void initConnection ( )

redis\Connection getIsActive()

getIsActive() public method Returns a value indicating whether the DB connection is established. public boolean getIsActive ( )return boolean Whether the DB connection is established

redis\Connection open()

open() public method Establishes a DB connection. It does nothing if a DB connection has already been established. public void open ( )throws yii\db\Exception if connection fails

redis\Connection getLuaScriptBuilder()

getLuaScriptBuilder() public method public yii\redis\LuaScriptBuilder getLuaScriptBuilder ( )

redis\Connection executeCommand()

executeCommand() public method Executes a redis command. For a list of available commands and their parameters see http://redis.io/commands. public array|boolean|null|string executeCommand ( $name, $params = [] )$name string The name of the command $params array List of parameters for the command return array|boolean|null|string Dependent on the executed command this method will return different data types: true for commands that return "status reply" with the message 'OK' or 'PON

redis\Connection getDriverName()

getDriverName() public method Returns the name of the DB driver for the current \yii\redis\dsn. public string getDriverName ( )return string Name of the DB driver

redis\Connection EVENT_AFTER_OPEN

EVENT_AFTER_OPEN event of type \yii\redis\Event An event that is triggered after a DB connection is established

redis\Connection close()

close() public method Closes the currently active DB connection. It does nothing if the connection is already closed. public void close ( )

redis\Connection $unixSocket

$unixSocket public property (available since version 2.0.1) The unix socket path (e.g. /var/run/redis/redis.sock) to use for connecting to the redis server. This can be used instead of $hostname and $port to connect to the server using a unix socket. If a unix socket path is specified, $hostname and $port will be ignored. public string $unixSocket = null

redis\Connection $password

$password public property The password for establishing DB connection. Defaults to null meaning no AUTH command is send. See http://redis.io/commands/auth public string $password = null