summaryrefslogtreecommitdiffstats
path: root/lib/private/appframework
diff options
context:
space:
mode:
authorBernhard Posselt <dev@bernhard-posselt.com>2015-04-29 22:29:45 +0200
committerBernhard Posselt <dev@bernhard-posselt.com>2015-04-29 22:29:45 +0200
commit1e58538f0e41a2f4773bafa2861695381a0e7e1b (patch)
tree5130ed05a8228b656969c4eeb93430189850d3b5 /lib/private/appframework
parent8955f38e55e5ec99e79fae6ab999185fcceb0466 (diff)
downloadnextcloud-server-1e58538f0e41a2f4773bafa2861695381a0e7e1b.tar.gz
nextcloud-server-1e58538f0e41a2f4773bafa2861695381a0e7e1b.zip
add aliases to pascal case constructor paramters to make it possible to auto assemble controllers
Diffstat (limited to 'lib/private/appframework')
-rw-r--r--lib/private/appframework/dependencyinjection/dicontainer.php11
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/private/appframework/dependencyinjection/dicontainer.php b/lib/private/appframework/dependencyinjection/dicontainer.php
index 8f69e237541..5072a65c02f 100644
--- a/lib/private/appframework/dependencyinjection/dicontainer.php
+++ b/lib/private/appframework/dependencyinjection/dicontainer.php
@@ -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
*/