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 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 getLuaScriptBuilder()

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

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 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 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 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 $socketClientFlags

$socketClientFlags public property (available since version 2.0.5) Bitmask field which may be set to any combination of connection flags passed to stream_socket_client(). Currently the select of connection flags is limited to STREAM_CLIENT_CONNECT (default), STREAM_CLIENT_ASYNC_CONNECT and STREAM_CLIENT_PERSISTENT. See also http://php.net/manual/en/function.stream-socket-client.php. public integer $socketClientFlags = STREAM_CLIENT_CONNECT