예제 #1
0
파일: RomaClient.php 프로젝트: keiju/roma
 /**
  * append value.
  * @param key             (string)
  * @param value           (string)
  * @param expire time     (int)
  * @return [success|fail] (bool)
  */
 public function append($key, $value, $exptime)
 {
     $result = rmc_append($key, $value, $exptime);
     return $result == RomaClient::STORED ? True : False;
 }
예제 #2
0
 /**
  * @brief Append value.(Issue 'append' command).
  * @param key
  * @param value
  * @param exptime Specify the value of expire second.
  * @return Returns True if success.
  */
 public function append($key, $value, $exptime)
 {
     $result = rmc_append($this->client_id, $key, $value, $exptime, $this->default_timeout);
     if (is_null($result) || $result == RomaClient::RMC_RET_EXCEPTION) {
         throw new Exception("rmc_append() failure");
     } else {
         if ($result == RomaClient::RMC_RET_ERROR) {
             return False;
         }
     }
     return True;
 }