summaryrefslogtreecommitdiffstats
path: root/lib/private/appframework/dependencyinjection/dicontainer.php
diff options
context:
space:
mode:
authorBernhard Posselt <dev@bernhard-posselt.com>2014-05-06 16:29:19 +0200
committerBernhard Posselt <dev@bernhard-posselt.com>2014-05-11 17:54:08 +0200
commit80648da43197c91ed52f36cee8bc818038b88eb6 (patch)
treeea604192691d7b74857ed639311185de0d93504c /lib/private/appframework/dependencyinjection/dicontainer.php
parenta252f59cd436d2c005755955bc93ab44544df766 (diff)
downloadnextcloud-server-80648da43197c91ed52f36cee8bc818038b88eb6.tar.gz
nextcloud-server-80648da43197c91ed52f36cee8bc818038b88eb6.zip
implement most of the basic stuff that was suggested in #8290
Diffstat (limited to 'lib/private/appframework/dependencyinjection/dicontainer.php')
-rw-r--r--lib/private/appframework/dependencyinjection/dicontainer.php16
1 files changed, 14 insertions, 2 deletions
diff --git a/lib/private/appframework/dependencyinjection/dicontainer.php b/lib/private/appframework/dependencyinjection/dicontainer.php
index becd755bda7..c6139df2382 100644
--- a/lib/private/appframework/dependencyinjection/dicontainer.php
+++ b/lib/private/appframework/dependencyinjection/dicontainer.php
@@ -33,6 +33,7 @@ use OC\AppFramework\Middleware\Security\SecurityMiddleware;
use OC\AppFramework\Middleware\Security\CORSMiddleware;
use OC\AppFramework\Utility\SimpleContainer;
use OC\AppFramework\Utility\TimeFactory;
+use OC\AppFramework\Utility\ControllerMethodReflector;
use OCP\AppFramework\IApi;
use OCP\AppFramework\IAppContainer;
use OCP\AppFramework\Middleware;
@@ -81,7 +82,11 @@ class DIContainer extends SimpleContainer implements IAppContainer{
});
$this['Dispatcher'] = $this->share(function($c) {
- return new Dispatcher($c['Protocol'], $c['MiddlewareDispatcher']);
+ return new Dispatcher(
+ $c['Protocol'],
+ $c['MiddlewareDispatcher'],
+ $c['ControllerMethodReflector']
+ );
});
@@ -90,7 +95,11 @@ class DIContainer extends SimpleContainer implements IAppContainer{
*/
$app = $this;
$this['SecurityMiddleware'] = $this->share(function($c) use ($app){
- return new SecurityMiddleware($app, $c['Request']);
+ return new SecurityMiddleware(
+ $app,
+ $c['Request'],
+ $c['ControllerMethodReflector']
+ );
});
$this['CORSMiddleware'] = $this->share(function($c) {
@@ -118,6 +127,9 @@ class DIContainer extends SimpleContainer implements IAppContainer{
return new TimeFactory();
});
+ $this['ControllerMethodReflector'] = $this->share(function($c) {
+ return new ControllerMethodReflector();
+ });
}