Beispiel #1
0
 /**
  * Moves a key to a different database.
  *
  * @param string $key
  * @param int $dbindex
  * @return bool: TRUE in case of success, FALSE in case of failure.
  * @link http://redis.io/commands/move
  * @example
  * <pre>
  * $redis->select(0); // switch to DB 0
  * $redis->set('x', '42'); // write 42 to x
  * $redis->move('x', 1); // move to DB 1
  * $redis->select(1); // switch to DB 1
  * $redis->get('x'); // will return 42
  * </pre>
  */
 public function move($key, $dbindex)
 {
     try {
         return $this->client->move($key, $dbindex);
     } catch (Exception $e) {
         return $this->handleException($e, __FUNCTION__, func_get_args());
     }
 }
 /**
  * Moves a key to a different database.
  *
  * @param string $key
  * @param int $dbindex
  * @return bool: TRUE in case of success, FALSE in case of failure.
  * @link http://redis.io/commands/move
  * @example
  * <pre>
  * $redis->select(0); // switch to DB 0
  * $redis->set('x', '42'); // write 42 to x
  * $redis->move('x', 1); // move to DB 1
  * $redis->select(1); // switch to DB 1
  * $redis->get('x'); // will return 42
  * </pre>
  */
 public function move($key, $dbindex)
 {
     $this->appendToLog('MOVE');
     return $this->client->move($key, $dbindex);
 }