Exemple #1
0
bool IniSetting::Set(const std::string& name, const folly::dynamic& value,
                     FollyDynamic) {
  // Need to make sure to update the value if the pair exists already
  // A general insert(make_pair) won't actually update new values.
  bool found = false;
  for (auto& pair : s_system_settings) {
    if (pair.first == name) {
      pair.second = value;
      found = true;
      break;
    }
  }
  if (!found) {
    s_system_settings.insert(make_pair(name, value));
  }
  return ini_set(name, value, PHP_INI_SET_EVERY);
}
Exemple #2
0
bool IniSetting::Set(const std::string& name, const folly::dynamic& value,
                     FollyDynamic) {
  s_system_settings.insert(make_pair(name, value));
  return ini_set(name, value, PHP_INI_SET_EVERY);
}