Add for proper DI
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
This commit is contained in:
parent
92dc9e6899
commit
3260f69590
|
@ -46,6 +46,7 @@ use OC\AppFramework\Utility\SimpleContainer;
|
||||||
use OC\Core\Middleware\TwoFactorMiddleware;
|
use OC\Core\Middleware\TwoFactorMiddleware;
|
||||||
use OCP\AppFramework\IApi;
|
use OCP\AppFramework\IApi;
|
||||||
use OCP\AppFramework\IAppContainer;
|
use OCP\AppFramework\IAppContainer;
|
||||||
|
use OCP\Files\IAppData;
|
||||||
|
|
||||||
|
|
||||||
class DIContainer extends SimpleContainer implements IAppContainer {
|
class DIContainer extends SimpleContainer implements IAppContainer {
|
||||||
|
@ -164,6 +165,10 @@ class DIContainer extends SimpleContainer implements IAppContainer {
|
||||||
return $this->getServer()->getHTTPClientService();
|
return $this->getServer()->getHTTPClientService();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$this->registerService(IAppData::class, function (SimpleContainer $c) {
|
||||||
|
return $this->getServer()->getAppDataDir($c->query('AppName'));
|
||||||
|
});
|
||||||
|
|
||||||
$this->registerService('OCP\\IGroupManager', function($c) {
|
$this->registerService('OCP\\IGroupManager', function($c) {
|
||||||
return $this->getServer()->getGroupManager();
|
return $this->getServer()->getGroupManager();
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue