IAppConfig¶
-
interface
OCP\AppFramework\Services\
IAppConfig
¶ - Wrapper for AppConfig for the AppFramework
Implemented by: OC\AppFramework\Services\AppConfig
Source: lib/public/AppFramework/Services/IAppConfig.php#34
Methods¶
-
public
OCP\AppFramework\Services\IAppConfig::
getAppKeys
()¶ - Get all keys stored for this app
Source: lib/public/AppFramework/Services/IAppConfig.php#41 Returns: string[] the keys stored for the app Since: 20.0.0
-
public
OCP\AppFramework\Services\IAppConfig::
setAppValue
($key, $value)¶ - Writes a new app wide value
Source: Parameters: - $key (string) the key of the value, under which will be saved
- $value (string) the value that should be stored
Returns: void
Since: 20.0.0
-
public
OCP\AppFramework\Services\IAppConfig::
getAppValue
($key, $default="")¶ - Looks up an app wide defined value
Source: 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 the saved value
Since: 20.0.0
-
public
OCP\AppFramework\Services\IAppConfig::
deleteAppValue
($key)¶ - Delete an app wide defined value
Source: Parameters: - $key (string) the key of the value, under which it was saved
Returns: void
Since: 20.0.0
-
public
OCP\AppFramework\Services\IAppConfig::
deleteAppValues
()¶ - Removes all keys in appconfig belonging to the app
Source: lib/public/AppFramework/Services/IAppConfig.php#78 Returns: void Since: 20.0.0
-
public
OCP\AppFramework\Services\IAppConfig::
setUserValue
($userId, $key, $value, $preCondition=null)¶ - Set a user defined value
Source: Parameters: - $userId (string) the userId of the user that we want to store the value under
- $key (string) the key under which the value is being stored
- $value (string) 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 metThrows: \UnexpectedValueException
when trying to store an unexpected valueThrows: \OCP\PreConditionNotMetException
if a precondition is specified and is not metThrows: \UnexpectedValueException
when trying to store an unexpected valueSince: 20.0.0
-
public
OCP\AppFramework\Services\IAppConfig::
getUserValue
($userId, $key, $default="")¶ - Shortcut for getting a user defined value
Source: Parameters: - $userId (string) the userId of the user that we want to store 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
Since: 20.0.0
-
public
OCP\AppFramework\Services\IAppConfig::
deleteUserValue
($userId, $key)¶ - Delete a user value
Source: Parameters: - $userId (string) the userId of the user that we want to store the value under
- $key (string) the key under which the value is being stored
Since: 20.0.0