diff options
author | Julius Härtl <jus@bitgrid.net> | 2018-01-29 13:09:32 +0100 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2018-01-31 14:13:15 +0100 |
commit | 19a0a9a4e7e9e511f5f3d99c697e57e7bb0260e6 (patch) | |
tree | 6222451aff18bbb4417f9568fec9dccee7ebf721 /lib/public | |
parent | 142914608307839dca300a2d410b869b6d2d3444 (diff) | |
download | nextcloud-server-19a0a9a4e7e9e511f5f3d99c697e57e7bb0260e6.tar.gz nextcloud-server-19a0a9a4e7e9e511f5f3d99c697e57e7bb0260e6.zip |
Move getAppInfo and getAppVersion to IAppManager
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'lib/public')
-rw-r--r-- | lib/public/App.php | 4 | ||||
-rw-r--r-- | lib/public/App/IAppManager.php | 20 |
2 files changed, 23 insertions, 1 deletions
diff --git a/lib/public/App.php b/lib/public/App.php index 3afd36f2c96..d44f719b7ea 100644 --- a/lib/public/App.php +++ b/lib/public/App.php @@ -114,6 +114,7 @@ class App { * @param string $app id of the app or the path of the info.xml file * @param boolean $path (optional) * @return array|null + * @deprecated 14.0.0 ise \OC::$server->getAppManager()->getAppInfo($appId) * @since 4.0.0 */ public static function getAppInfo( $app, $path=false ) { @@ -148,8 +149,9 @@ class App { * @param string $app * @return string * @since 4.0.0 + * @deprecated 14.0.0 use \OC::$server->getAppManager()->getAppVersion($appId) */ public static function getAppVersion( $app ) { - return \OC_App::getAppVersion( $app ); + return \OC::$server->getAppManager()->getAppVersion($app); } } diff --git a/lib/public/App/IAppManager.php b/lib/public/App/IAppManager.php index f602a6de81e..0c087b61515 100644 --- a/lib/public/App/IAppManager.php +++ b/lib/public/App/IAppManager.php @@ -36,6 +36,26 @@ use OCP\IUser; * @since 8.0.0 */ interface IAppManager { + + /** + * Returns the app information from "appinfo/info.xml". + * + * @param string $appId + * @return mixed + * @since 14.0.0 + */ + public function getAppInfo(string $appId, bool $path = false, $lang = null); + + /** + * Returns the app information from "appinfo/info.xml". + * + * @param string $appId + * @param bool $useCache + * @return mixed + * @since 14.0.0 + */ + public function getAppVersion(string $appId, bool $useCache = true); + /** * Check if an app is enabled for user * |