Predis\Client::createCommand PHP Method

createCommand() public method

public createCommand ( $commandID, $arguments = [] )
    public function createCommand($commandID, $arguments = array())
    {
        return $this->commands->createCommand($commandID, $arguments);
    }

Usage Example

Ejemplo n.º 1
0
 /**
  * * Add a value to the cache under a unique key
  *
  * @param string $key
  * @param mixed  $value
  * @param int    $ttl
  */
 public function set($key, $value, $ttl = null)
 {
     $this->client->set($key, $value);
     if ($ttl) {
         $cmd = $this->client->createCommand('EXPIRE');
         $cmd->setArguments(array($key, $ttl));
         $this->client->executeCommand($cmd);
     }
 }
All Usage Examples Of Predis\Client::createCommand