diff options
author | Christoph Wurst <christoph@winzerhof-wurst.at> | 2020-07-16 10:24:12 +0200 |
---|---|---|
committer | Christoph Wurst <christoph@winzerhof-wurst.at> | 2020-07-16 15:44:03 +0200 |
commit | 5005510d828fb86602965af5c9263770f8af1f62 (patch) | |
tree | dc44b1b89571a090d8ebbe9c681e8e9da4694134 /apps/dav | |
parent | b12d3691c332480bc20e341b1bc23cb75977f148 (diff) | |
download | nextcloud-server-5005510d828fb86602965af5c9263770f8af1f62.tar.gz nextcloud-server-5005510d828fb86602965af5c9263770f8af1f62.zip |
Migrate DAV to the PSR container
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'apps/dav')
-rw-r--r-- | apps/dav/lib/AppInfo/Application.php | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/apps/dav/lib/AppInfo/Application.php b/apps/dav/lib/AppInfo/Application.php index 083bd8a474f..bf1e6146330 100644 --- a/apps/dav/lib/AppInfo/Application.php +++ b/apps/dav/lib/AppInfo/Application.php @@ -62,11 +62,11 @@ use OCP\AppFramework\IAppContainer; use OCP\Calendar\IManager as ICalendarManager; use OCP\Contacts\IManager as IContactsManager; use OCP\IConfig; -use OCP\IContainer; use OCP\ILogger; use OCP\IServerContainer; use OCP\IUser; use OCP\Notification\IManager as INotificationManager; +use Psr\Container\ContainerInterface; use Symfony\Component\EventDispatcher\EventDispatcherInterface; use Symfony\Component\EventDispatcher\GenericEvent; use Throwable; @@ -76,22 +76,19 @@ use function strpos; class Application extends App implements IBootstrap { public const APP_ID = 'dav'; - /** - * Application constructor. - */ public function __construct() { parent::__construct(self::APP_ID); } public function register(IRegistrationContext $context): void { $context->registerServiceAlias('CardDAVSyncService', SyncService::class); - $context->registerService(PhotoCache::class, function (IContainer $c) { + $context->registerService(PhotoCache::class, function (ContainerInterface $c) { /** @var IServerContainer $server */ - $server = $c->query(IServerContainer::class); + $server = $c->get(IServerContainer::class); return new PhotoCache( $server->getAppDataDir('dav-photocache'), - $server->getLogger() + $c->get(ILogger::class) ); }); |