]> source.dussan.org Git - nextcloud-server.git/commitdiff
Lets use DI where we can 16643/head
authorRoeland Jago Douma <roeland@famdouma.nl>
Fri, 2 Aug 2019 18:43:50 +0000 (20:43 +0200)
committerRoeland Jago Douma <roeland@famdouma.nl>
Fri, 2 Aug 2019 18:43:50 +0000 (20:43 +0200)
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
apps/files/lib/AppInfo/Application.php

index dc2ed59618e5fb90d31fad5bc09b3ddc577780a5..cef4b31f85f697557d88f884a57db32bcb78774f 100644 (file)
@@ -59,40 +59,15 @@ class Application extends App {
                        );
                });
 
-               $container->registerService('ViewController', function (IContainer $c) use ($server) {
-                       return new ViewController(
-                               $c->query('AppName'),
-                               $c->query('Request'),
-                               $server->getURLGenerator(),
-                               $c->query('L10N'),
-                               $server->getConfig(),
-                               $server->getEventDispatcher(),
-                               $server->getUserSession(),
-                               $server->getAppManager(),
-                               $server->getRootFolder(),
-                               $c->query(Helper::class)
-                       );
-               });
-
-               /**
-                * Core
-                */
-               $container->registerService('L10N', function(IContainer $c) {
-                       return $c->query('ServerContainer')->getL10N($c->query('AppName'));
-               });
-
                /**
                 * Services
                 */
-               $container->registerService('Tagger', function(IContainer $c)  {
-                       return $c->query('ServerContainer')->getTagManager()->load('files');
-               });
                $container->registerService('TagService', function(IContainer $c) use ($server) {
                        $homeFolder = $c->query('ServerContainer')->getUserFolder();
                        return new TagService(
                                $c->query('ServerContainer')->getUserSession(),
                                $c->query('ServerContainer')->getActivityManager(),
-                               $c->query('Tagger'),
+                               $c->query('ServerContainer')->getTagManager()->load('files'),
                                $homeFolder,
                                $server->getEventDispatcher()
                        );