aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Server.php
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2017-05-10 17:31:05 -0500
committerGitHub <noreply@github.com>2017-05-10 17:31:05 -0500
commit167013dbf9e7de63e702854a9e770f73fca016f5 (patch)
treea740faf531c6eb31daeaf221657c4d9aeb67e919 /lib/private/Server.php
parent1c2ccd220611a3c269c8122dcab8a3a6251053ef (diff)
parent538d32fe8734f563f3116c473f770bd4277c925b (diff)
downloadnextcloud-server-167013dbf9e7de63e702854a9e770f73fca016f5.tar.gz
nextcloud-server-167013dbf9e7de63e702854a9e770f73fca016f5.zip
Merge pull request #4783 from nextcloud/lite-application-classes
Use automatic injection for appdata folders
Diffstat (limited to 'lib/private/Server.php')
-rw-r--r--lib/private/Server.php20
1 files changed, 2 insertions, 18 deletions
diff --git a/lib/private/Server.php b/lib/private/Server.php
index 9731bd294e8..9d54421e3e9 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);
}
/**