AllConfig

class OC\AllConfig
Class to combine all the configuration options ownCloud offers
Source:lib/private/AllConfig.php#43
Implements:OCP\IConfig

Properties

Methods

public OC\AllConfig::__construct($systemConfig)
Source:

lib/private/AllConfig.php#75

Parameters:
public OC\AllConfig::setSystemValues($configs)
Sets and deletes system wide values
Source:

lib/private/AllConfig.php#105

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

If value is null, the config key will be deleted

public OC\AllConfig::setSystemValue($key, $value)
Sets a new system wide value
Source:

lib/private/AllConfig.php#115

Parameters:
  • $key (string) the key of the value, under which will be saved
  • $value (mixed) the value that should be stored
public OC\AllConfig::getSystemValue($key, $default="")
Looks up a system wide defined value
Source:

lib/private/AllConfig.php#126

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\AllConfig::getSystemValueBool($key, $default=false)
Looks up a boolean system wide defined value
Source:

lib/private/AllConfig.php#140

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

bool

Since:

16.0.0

public OC\AllConfig::getSystemValueInt($key, $default=0)
Looks up an integer system wide defined value
Source:

lib/private/AllConfig.php#154

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

int

Since:

16.0.0

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

lib/private/AllConfig.php#168

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

string

Since:

16.0.0

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

lib/private/AllConfig.php#179

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\AllConfig::deleteSystemValue($key)
Delete a system wide defined value
Source:

lib/private/AllConfig.php#188

Parameters:
  • $key (string) the key of the value, under which it was saved
public OC\AllConfig::getAppKeys($appName)
Get all keys stored for an app
Source:

lib/private/AllConfig.php#198

Parameters:
  • $appName (string) the appName that we stored the value under
Returns:

string[] the keys stored for the app

public OC\AllConfig::setAppValue($appName, $key, $value)
Writes a new app wide value
Source:

lib/private/AllConfig.php#209

Parameters:
  • $appName (string) the appName that we want to store the value under
  • $key (string) the key of the value, under which will be saved
  • $value (string | float | int) the value that should be stored
public OC\AllConfig::getAppValue($appName, $key, $default="")
Looks up an app wide defined value
Source:

lib/private/AllConfig.php#221

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

string the saved value

public OC\AllConfig::deleteAppValue($appName, $key)
Delete an app wide defined value
Source:

lib/private/AllConfig.php#231

Parameters:
  • $appName (string) the appName that we stored the value under
  • $key (string) the key of the value, under which it was saved
public OC\AllConfig::deleteAppValues($appName)
Removes all keys in appconfig belonging to the app
Source:

lib/private/AllConfig.php#240

Parameters:
  • $appName (string) the appName the configs are stored under
public OC\AllConfig::setUserValue($userId, $appName, $key, $value, $preCondition=null)
Set a user defined value
Source:

lib/private/AllConfig.php#256

Parameters:
  • $userId (string) the userId of the user that we want to store the value under
  • $appName (string) the appName that we want to store the value under
  • $key (string) the key under which the value is being stored
  • $value (string | float | int) the value that you want to store
  • $preCondition (string) only update if the config value was previously the value passed as $preCondition
Throws:

\OCP\PreConditionNotMetException if a precondition is specified and is not met

Throws:

\UnexpectedValueException when trying to store an unexpected value

Throws:

\OCP\PreConditionNotMetException if a precondition is specified and is not met

Throws:

\UnexpectedValueException when trying to store an unexpected value

public OC\AllConfig::getUserValue($userId, $appName, $key, $default="")
Getting a user defined value
Source:

lib/private/AllConfig.php#318

Parameters:
  • $userId (string) the userId of the user that we want to store the value under
  • $appName (string) the appName that we stored the value under
  • $key (string) the key under which the value is being stored
  • $default (mixed) the default value to be returned if the value isn’t set
Returns:

string

public OC\AllConfig::getUserKeys($userId, $appName)
Get the keys of all stored by an app for the user
Source:

lib/private/AllConfig.php#334

Parameters:
  • $userId (string) the userId of the user that we want to store the value under
  • $appName (string) the appName that we stored the value under
Returns:

string[]

public OC\AllConfig::deleteUserValue($userId, $appName, $key)
Delete a user value
Source:

lib/private/AllConfig.php#350

Parameters:
  • $userId (string) the userId of the user that we want to store the value under
  • $appName (string) the appName that we stored the value under
  • $key (string) the key under which the value is being stored
public OC\AllConfig::deleteAllUserValues($userId)
Delete all user values
Source:

lib/private/AllConfig.php#368

Parameters:
  • $userId (string) the userId of the user that we want to remove all values from
public OC\AllConfig::deleteAppFromAllUsers($appName)
Delete all user related values of one app
Source:

lib/private/AllConfig.php#384

Parameters:
  • $appName (string) the appName of the app that we want to remove all values from
public OC\AllConfig::getUserValueForUsers($appName, $key, $userIds)
Fetches a mapped list of userId -> value, for a specified app and key and a list of user IDs.
Source:

lib/private/AllConfig.php#440

Parameters:
  • $appName (string) app to get the value for
  • $key (string) the key to get the value for
  • $userIds (array) the user IDs to fetch the values for
Returns:

array Mapped values: userId => value

public OC\AllConfig::getUsersForUserValue($appName, $key, $value)
Determines the users that have the given value set for a specific app-key-pair
Source:

lib/private/AllConfig.php#482

Parameters:
  • $appName (string) the app to get the user for
  • $key (string) the key to get the user for
  • $value (string) the value to get the user for
Returns:

array of user IDs

public OC\AllConfig::getUsersForUserValueCaseInsensitive($appName, $key, $value)
Determines the users that have the given value set for a specific app-key-pair
Source:

lib/private/AllConfig.php#514

Parameters:
  • $appName (string) the app to get the user for
  • $key (string) the key to get the user for
  • $value (string) the value to get the user for
Returns:

array of user IDs

public OC\AllConfig::getSystemConfig()
Source:lib/private/AllConfig.php#538