Esempio n. 1
0
bool IniSetting::ResetSystemDefault(const std::string& name) {
  auto it = s_system_settings.find(name);
  if (it == s_system_settings.end()) {
    return false;
  }
  return ini_set(name, it->second, PHP_INI_SET_EVERY);
}
Esempio n. 2
0
bool IniSetting::GetSystem(const String& name, Variant& value) {
  auto it = s_system_settings.find(name.toCppString());
  if (it == s_system_settings.end()) {
    return false;
  }
  value = it->second;
  return true;
}
 void operator()(SettingMap &map)
 {
     auto it = map.find(myComponents[myIndex]);
     if (it != map.end())
     {
         if (myIndex == myComponents.size() - 1)
             map.erase(it);
         else
         {
             ++myIndex;
             boost::apply_visitor(*this, it->second);
         }
     }
 }
    boost::optional<SettingValue> operator()(const SettingMap &map) const
    {
        auto it = map.find(myComponents[myIndex]);
        if (it == map.end())
            return boost::none;

        const SettingValue &value = it->second;
        if (myIndex == myComponents.size() - 1)
            return value;
        else
        {
            if (!boost::apply_visitor(IsMap(), value))
                return boost::none;

            ++myIndex;
            return boost::apply_visitor(*this, value);
        }
    }