Provide IAppContainer as dependency injection

This commit is contained in:
Morris Jobke 2015-10-20 10:32:53 +02:00
parent a59ad87db8
commit a0743f12c6

View file

@ -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');