Simple IAppConfig deprecations

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
This commit is contained in:
Roeland Jago Douma 2018-01-17 21:03:04 +01:00
parent 6e29b8731e
commit ee2617d88c
No known key found for this signature in database
GPG Key ID: F941078878347C0C
3 changed files with 3 additions and 39 deletions

View File

@ -152,7 +152,7 @@ class AllConfig implements \OCP\IConfig {
* @return string[] the keys stored for the app * @return string[] the keys stored for the app
*/ */
public function getAppKeys($appName) { public function getAppKeys($appName) {
return \OC::$server->getAppConfig()->getKeys($appName); \OC::$server->query(\OC\AppConfig::class)->getKeys($appName);
} }
/** /**
@ -185,7 +185,7 @@ class AllConfig implements \OCP\IConfig {
* @param string $key the key of the value, under which it was saved * @param string $key the key of the value, under which it was saved
*/ */
public function deleteAppValue($appName, $key) { public function deleteAppValue($appName, $key) {
\OC::$server->getAppConfig()->deleteKey($appName, $key); \OC::$server->query(\OC\AppConfig::class)->deleteKey($appName, $key);
} }
/** /**
@ -194,7 +194,7 @@ class AllConfig implements \OCP\IConfig {
* @param string $appName the appName the configs are stored under * @param string $appName the appName the configs are stored under
*/ */
public function deleteAppValues($appName) { public function deleteAppValues($appName) {
\OC::$server->getAppConfig()->deleteApp($appName); \OC::$server->query(\OC\AppConfig::class)->deleteApp($appName);
} }

View File

@ -101,7 +101,6 @@ class AppConfig implements IAppConfig {
* *
* @param string $app the app we are looking for * @param string $app the app we are looking for
* @return array an array of key names * @return array an array of key names
* @deprecated 8.0.0 use method getAppKeys of \OCP\IConfig
* *
* This function gets all keys of an app. Please note that the values are * This function gets all keys of an app. Please note that the values are
* not returned. * not returned.
@ -220,7 +219,6 @@ class AppConfig implements IAppConfig {
* @param string $app app * @param string $app app
* @param string $key key * @param string $key key
* @return boolean * @return boolean
* @deprecated 8.0.0 use method deleteAppValue of \OCP\IConfig
*/ */
public function deleteKey($app, $key) { public function deleteKey($app, $key) {
$this->loadConfigValues(); $this->loadConfigValues();
@ -242,7 +240,6 @@ class AppConfig implements IAppConfig {
* *
* @param string $app app * @param string $app app
* @return boolean * @return boolean
* @deprecated 8.0.0 use method deleteAppValue of \OCP\IConfig
* *
* Removes all keys in appconfig belonging to the app. * Removes all keys in appconfig belonging to the app.
*/ */

View File

@ -54,28 +54,6 @@ interface IAppConfig {
*/ */
public function getValue($app, $key, $default = null); public function getValue($app, $key, $default = null);
/**
* Deletes a key
* @param string $app app
* @param string $key key
* @return bool
* @deprecated 8.0.0 use method deleteAppValue of \OCP\IConfig
* @since 7.0.0
*/
public function deleteKey($app, $key);
/**
* Get the available keys for an app
* @param string $app the app we are looking for
* @return array an array of key names
* @deprecated 8.0.0 use method getAppKeys of \OCP\IConfig
*
* This function gets all keys of an app. Please note that the values are
* not returned.
* @since 7.0.0
*/
public function getKeys($app);
/** /**
* get multiply values, either the app or key can be used as wildcard by setting it to false * get multiply values, either the app or key can be used as wildcard by setting it to false
* *
@ -117,15 +95,4 @@ interface IAppConfig {
* @since 7.0.0 * @since 7.0.0
*/ */
public function getApps(); public function getApps();
/**
* Remove app from appconfig
* @param string $app app
* @return bool
* @deprecated 8.0.0 use method deleteAppValue of \OCP\IConfig
*
* Removes all keys in appconfig belonging to the app.
* @since 7.0.0
*/
public function deleteApp($app);
} }