/** * get value. * @param key * @return value (string) */ public function get($key) { $result = rmc_get($key); if ($result == "") { $result = NULL; } return $result; }
/** * @brief Get value.(Issue 'get' command). * @param key * @return value */ public function get($key) { $result = rmc_get($this->client_id, $key, $this->default_timeout); if (is_null($result) || $result == RomaClient::RMC_RET_EXCEPTION) { throw new Exception("rmc_get() failure"); } else { if ($result == RomaClient::RMC_RET_ERROR) { return False; } } if ($result[1] < 0) { return null; } return $result[0]; }