Skip to content
Snippets Groups Projects
Commit a0743f12 authored by Morris Jobke's avatar Morris Jobke
Browse files

Provide IAppContainer as dependency injection

parent a59ad87d
Branches main
No related tags found
No related merge requests found
......@@ -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');
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment