diff options
author | Joas Schilling <coding@schilljs.com> | 2017-05-10 09:56:38 +0200 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2017-05-10 09:56:38 +0200 |
commit | 538d32fe8734f563f3116c473f770bd4277c925b (patch) | |
tree | 004d99e6d04fdf07863ce3983869805b76833b3a /lib/private/Server.php | |
parent | ca399406146d74f2f46f8b8815f0b3c165c996ab (diff) | |
download | nextcloud-server-538d32fe8734f563f3116c473f770bd4277c925b.tar.gz nextcloud-server-538d32fe8734f563f3116c473f770bd4277c925b.zip |
Automatic injection into the Fetchers
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib/private/Server.php')
-rw-r--r-- | lib/private/Server.php | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/lib/private/Server.php b/lib/private/Server.php index 07e449ee4a9..8e17ae397b7 100644 --- a/lib/private/Server.php +++ b/lib/private/Server.php @@ -420,24 +420,8 @@ class Server extends ServerContainer implements IServerContainer { $this->registerService('AppHelper', function ($c) { return new \OC\AppHelper(); }); - $this->registerService(AppFetcher::class, function ($c) { - return new AppFetcher( - $this->getAppDataDir('appstore'), - $this->getHTTPClientService(), - $this->query(TimeFactory::class), - $this->getConfig() - ); - }); $this->registerAlias('AppFetcher', AppFetcher::class); - - $this->registerService('CategoryFetcher', function ($c) { - return new CategoryFetcher( - $this->getAppDataDir('appstore'), - $this->getHTTPClientService(), - $this->query(TimeFactory::class), - $this->getConfig() - ); - }); + $this->registerAlias('CategoryFetcher', CategoryFetcher::class); $this->registerService(\OCP\ICache::class, function ($c) { return new Cache\File(); @@ -1290,7 +1274,7 @@ class Server extends ServerContainer implements IServerContainer { * @return AppFetcher */ public function getAppFetcher() { - return $this->query('AppFetcher'); + return $this->query(AppFetcher::class); } /** |