diff options
author | Bernhard Posselt <dev@bernhard-posselt.com> | 2015-04-29 22:29:45 +0200 |
---|---|---|
committer | Bernhard Posselt <dev@bernhard-posselt.com> | 2015-04-29 22:29:45 +0200 |
commit | 1e58538f0e41a2f4773bafa2861695381a0e7e1b (patch) | |
tree | 5130ed05a8228b656969c4eeb93430189850d3b5 /lib/private/appframework | |
parent | 8955f38e55e5ec99e79fae6ab999185fcceb0466 (diff) | |
download | nextcloud-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.php | 11 |
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 */ |