Provide IAppContainer as dependency injection
This commit is contained in:
parent
a59ad87db8
commit
a0743f12c6
1 changed files with 4 additions and 0 deletions
|
@ -226,6 +226,10 @@ class DIContainer extends SimpleContainer implements IAppContainer {
|
|||
return $this->getServer();
|
||||
});
|
||||
|
||||
$this->registerService('OCP\\AppFramework\\IAppContainer', function ($c) {
|
||||
return $c;
|
||||
});
|
||||
|
||||
// commonly used attributes
|
||||
$this->registerService('UserId', function ($c) {
|
||||
return $c->query('OCP\\IUserSession')->getSession()->get('user_id');
|
||||
|
|
Loading…
Reference in a new issue