diff options
author | Bernhard Posselt <dev@bernhard-posselt.com> | 2014-05-28 02:12:01 +0200 |
---|---|---|
committer | Bernhard Posselt <dev@bernhard-posselt.com> | 2014-05-28 02:15:16 +0200 |
commit | 5e9ea2b3659eebf6d21c253771e477abe16496c9 (patch) | |
tree | b5d93d0eaa553e129a7d64fc080e57a08e15468f /lib/private/appframework/dependencyinjection | |
parent | 4e2cdb2f8af807767a978a175ef5415cd3d651eb (diff) | |
download | nextcloud-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.php | 15 |
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() ); }); |