diff options
author | dartcafe <github@dartcafe.de> | 2022-01-23 20:33:28 +0300 |
---|---|---|
committer | dartcafe <github@dartcafe.de> | 2022-01-23 20:33:28 +0300 |
commit | e0c4aa169dd49efac429432f46fd196290eb5c81 (patch) | |
tree | 4a2474a63940ca876e8a2dba7b0cb9e814b0df39 /lib | |
parent | 495d25241d83684892e34c4c341e97cbb62a7d34 (diff) |
replace deprecated class IAppContainer
Signed-off-by: dartcafe <github@dartcafe.de>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Helper/Container.php | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/Helper/Container.php b/lib/Helper/Container.php index d6da9697..f8fd4620 100644 --- a/lib/Helper/Container.php +++ b/lib/Helper/Container.php @@ -28,10 +28,11 @@ use OCA\Polls\Db\Poll; use OCA\Polls\Db\PollMapper; use OCA\Polls\Db\Share; use OCA\Polls\Db\ShareMapper; -use OCP\AppFramework\IAppContainer; +use OCP\App\IAppManager; +use Psr\Container\ContainerInterface; abstract class Container { - public static function getContainer() : IAppContainer { + public static function getContainer() : ContainerInterface { $app = \OC::$server->query(Application::class); return $app->getContainer(); } @@ -50,6 +51,6 @@ abstract class Container { } public static function isAppEnabled(string $app) : bool { - return \OC::$server->getAppManager()->isEnabledForUser($app); + return self::queryClass(IAppManager::class)->isEnabledForUser($app); } } |