AppConfig¶
-
class
OC\
AppConfig
¶ - This class provides an easy way for apps to store config values in thedatabase.
Source: lib/private/AppConfig.php#45 Implements: OCP\IAppConfig
Properties¶
-
protected static property
OC\AppConfig::$
sensitiveValues
¶ Source: lib/private/AppConfig.php#48 Type: array[]
-
protected static property
OC\AppConfig::$
conn
¶ Source: lib/private/AppConfig.php#72 Type: \OC\DB\Connection
Methods¶
-
public
OC\AppConfig::
__construct
($conn)¶ Source: Parameters: - $conn (
OC\DB\Connection
)
- $conn (
-
public
OC\AppConfig::
getApps
()¶ - Get all apps using the config
Source: Returns: array an array of app ids
This function returns a list of all apps that have at least one entry in the appconfig table.
-
public
OC\AppConfig::
getKeys
($app)¶ - Get the available keys for an app
Source: Parameters: - $app (string) the app we are looking for
Returns: array an array of key names
This function gets all keys of an app. Please note that the values are not returned.
-
public
OC\AppConfig::
getSortedKeys
($data)¶ Source: lib/private/AppConfig.php#134
-
public
OC\AppConfig::
getValue
($app, $key, $default=null)¶ - Gets the config value
Source: Parameters: - $app (string) app
- $key (string) key
- $default (string) = null, default value if the key does not exist
Returns: string the value or $default
This function gets a value from the appconfig table. If the key does not exist the default value will be returned
-
public
OC\AppConfig::
hasKey
($app, $key)¶ - check if a key is set in the appconfig
Source: Parameters: - $app (string)
- $key (string)
Returns: bool
-
public
OC\AppConfig::
setValue
($app, $key, $value)¶ - Sets a value. If the key did not exist before it will be created.
Source: Parameters: - $app (string) app
- $key (string) key
- $value (string | float | int) value
Returns: bool True if the value was inserted or updated, false if the value was the same
-
public
OC\AppConfig::
deleteKey
($app, $key)¶ - Deletes a key
Source: Parameters: - $app (string) app
- $key (string) key
Returns: bool
-
public
OC\AppConfig::
deleteApp
($app)¶ - Remove app from appconfig
Source: Parameters: - $app (string) app
Returns: bool Removes all keys in appconfig belonging to the app.
-
public
OC\AppConfig::
getValues
($app, $key)¶ - get multiple values, either the app or key can be used as wildcard by setting it to false
Source: Parameters: - $app (string | bool)
- $key (string | bool)
Returns: array | bool
-
public
OC\AppConfig::
getFilteredValues
($app)¶ - get all values of the app or and filters out sensitive data
Source: Parameters: - $app (string)
Returns: array
-
protected
OC\AppConfig::
loadConfigValues
()¶ - Load all the app config values
Source: lib/private/AppConfig.php#335
-
public
OC\AppConfig::
clearCachedConfig
()¶ - Clear all the cached app config valuesWARNING: do not use this - this is only for usage with the SCSSCacher toclear the memory cache of the app config
Source: lib/private/AppConfig.php#367