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 'PONG'.
  • string for commands that return "status reply" that does not have the message OK (since version 2.0.1).
  • string for commands that return "integer reply" as the value is in the range of a signed 64 bit integer.
  • string or null for commands that return "bulk reply".
  • array for commands that return "Multi-bulk replies".

See redis protocol description for details on the mentioned reply types.

throws yii\db\Exception

for commands that return error reply.

doc_Yii
2016-10-30 17:10:48
Comments
Leave a Comment

Please login to continue.