From 1e58538f0e41a2f4773bafa2861695381a0e7e1b Mon Sep 17 00:00:00 2001 From: Bernhard Posselt Date: Wed, 29 Apr 2015 22:29:45 +0200 Subject: [PATCH] add aliases to pascal case constructor paramters to make it possible to auto assemble controllers --- .../appframework/dependencyinjection/dicontainer.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/lib/private/appframework/dependencyinjection/dicontainer.php b/lib/private/appframework/dependencyinjection/dicontainer.php index 8f69e23754..5072a65c02 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 */