SystemConfig

class OC\SystemConfig
Class which provides access to the system config values stored in config.php
Internal class for bootstrap only.
fixes cyclic DI: AllConfig needs AppConfig needs Database needs AllConfig
Source:lib/private/SystemConfig.php#37

Properties

protected static property OC\SystemConfig::$sensitiveValues
Source:lib/private/SystemConfig.php#40
Type:array

Methods

public OC\SystemConfig::__construct($config)
Source:lib/private/SystemConfig.php#92
public OC\SystemConfig::getKeys()
Lists all available config keys
Source:lib/private/SystemConfig.php#100
Returns:array an array of key names
public OC\SystemConfig::setValue($key, $value)
Sets a new system wide value
Source:

lib/private/SystemConfig.php#110

Parameters:
  • $key (string) the key of the value, under which will be saved
  • $value (mixed) the value that should be stored
public OC\SystemConfig::setValues($configs)
Sets and deletes values and writes the config.php
Source:

lib/private/SystemConfig.php#120

Parameters:
  • $configs (array) Associative array with key => value pairs

If value is null, the config key will be deleted

public OC\SystemConfig::getValue($key, $default="")
Looks up a system wide defined value
Source:

lib/private/SystemConfig.php#131

Parameters:
  • $key (string) the key of the value, under which it was saved
  • $default (mixed) the default value to be returned if the value isn’t set
Returns:

mixed the value or $default

public OC\SystemConfig::getFilteredValue($key, $default="")
Looks up a system wide defined value and filters out sensitive data
Source:

lib/private/SystemConfig.php#142

Parameters:
  • $key (string) the key of the value, under which it was saved
  • $default (mixed) the default value to be returned if the value isn’t set
Returns:

mixed the value or $default

public OC\SystemConfig::deleteValue($key)
Delete a system wide defined value
Source:

lib/private/SystemConfig.php#157

Parameters:
  • $key (string) the key of the value, under which it was saved
protected OC\SystemConfig::removeSensitiveValue($keysToRemove, $value)
Source:

lib/private/SystemConfig.php#166

Parameters:
  • $keysToRemove (bool | array)
  • $value (mixed)
Returns:

mixed