Browse Source
Add for proper DI
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
pull/1306/head
Roeland Jago Douma
9 years ago
No known key found for this signature in database
GPG Key ID: 1E152838F164D13B
1 changed files with
5 additions and
0 deletions
-
lib/private/AppFramework/DependencyInjection/DIContainer.php
|
|
|
@ -46,6 +46,7 @@ use OC\AppFramework\Utility\SimpleContainer; |
|
|
|
use OC\Core\Middleware\TwoFactorMiddleware; |
|
|
|
use OCP\AppFramework\IApi; |
|
|
|
use OCP\AppFramework\IAppContainer; |
|
|
|
use OCP\Files\IAppData; |
|
|
|
|
|
|
|
|
|
|
|
class DIContainer extends SimpleContainer implements IAppContainer { |
|
|
|
@ -164,6 +165,10 @@ class DIContainer extends SimpleContainer implements IAppContainer { |
|
|
|
return $this->getServer()->getHTTPClientService(); |
|
|
|
}); |
|
|
|
|
|
|
|
$this->registerService(IAppData::class, function (SimpleContainer $c) { |
|
|
|
return $this->getServer()->getAppDataDir($c->query('AppName')); |
|
|
|
}); |
|
|
|
|
|
|
|
$this->registerService('OCP\\IGroupManager', function($c) { |
|
|
|
return $this->getServer()->getGroupManager(); |
|
|
|
}); |
|
|
|
|