[Pkg-owncloud-commits] [owncloud] 166/215: add aliases to pascal case constructor paramters to make it possible to auto assemble controllers
David Prévot
taffit at moszumanska.debian.org
Tue May 5 01:01:45 UTC 2015
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch stable8
in repository owncloud.
commit 1e58538f0e41a2f4773bafa2861695381a0e7e1b
Author: Bernhard Posselt <dev at bernhard-posselt.com>
Date: Wed Apr 29 22:29:45 2015 +0200
add aliases to pascal case constructor paramters to make it possible to auto assemble controllers
---
lib/private/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 8f69e23..5072a65 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
*/
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git
More information about the Pkg-owncloud-commits
mailing list