summaryrefslogtreecommitdiffstats
path: root/lib/private/appframework/dependencyinjection
diff options
context:
space:
mode:
authorBernhard Posselt <dev@bernhard-posselt.com>2014-05-28 02:12:01 +0200
committerBernhard Posselt <dev@bernhard-posselt.com>2014-05-28 02:15:16 +0200
commit5e9ea2b3659eebf6d21c253771e477abe16496c9 (patch)
treeb5d93d0eaa553e129a7d64fc080e57a08e15468f /lib/private/appframework/dependencyinjection
parent4e2cdb2f8af807767a978a175ef5415cd3d651eb (diff)
downloadnextcloud-server-5e9ea2b3659eebf6d21c253771e477abe16496c9.tar.gz
nextcloud-server-5e9ea2b3659eebf6d21c253771e477abe16496c9.zip
fix 8757, get rid of service locator antipattern
Diffstat (limited to 'lib/private/appframework/dependencyinjection')
-rw-r--r--lib/private/appframework/dependencyinjection/dicontainer.php15
1 files changed, 10 insertions, 5 deletions
diff --git a/lib/private/appframework/dependencyinjection/dicontainer.php b/lib/private/appframework/dependencyinjection/dicontainer.php
index ee492b8a9e5..61a2333ecee 100644
--- a/lib/private/appframework/dependencyinjection/dicontainer.php
+++ b/lib/private/appframework/dependencyinjection/dicontainer.php
@@ -83,8 +83,8 @@ class DIContainer extends SimpleContainer implements IAppContainer{
$this['Dispatcher'] = $this->share(function($c) {
return new Dispatcher(
- $c['Protocol'],
- $c['MiddlewareDispatcher'],
+ $c['Protocol'],
+ $c['MiddlewareDispatcher'],
$c['ControllerMethodReflector'],
$c['Request']
);
@@ -97,9 +97,14 @@ class DIContainer extends SimpleContainer implements IAppContainer{
$app = $this;
$this['SecurityMiddleware'] = $this->share(function($c) use ($app){
return new SecurityMiddleware(
- $app,
- $c['Request'],
- $c['ControllerMethodReflector']
+ $c['Request'],
+ $c['ControllerMethodReflector'],
+ $app->getServer()->getNavigationManager(),
+ $app->getServer()->getURLGenerator(),
+ $app->getServer()->getLogger(),
+ $c['AppName'],
+ $app->isLoggedIn(),
+ $app->isAdminUser()
);
});