Merge pull request #15946 from owncloud/auto-controller-resolve

Make controller automatically assemblable
This commit is contained in:
Thomas Müller 2015-04-30 10:12:17 +02:00
commit 08aef98e11
1 changed files with 11 additions and 0 deletions

View File

@ -63,6 +63,17 @@ class DIContainer extends SimpleContainer implements IAppContainer {
$this['AppName'] = $appName;
$this['urlParams'] = $urlParams;
// aliases
$this->registerService('appName', function($c) {
return $c->query('AppName');
});
$this->registerService('webRoot', function($c) {
return $c->query('WebRoot');
});
$this->registerService('userId', function($c) {
return $c->query('UserId');
});
/**
* Core services
*/