summaryrefslogtreecommitdiffstats
path: root/lib/private/appframework/dependencyinjection/dicontainer.php
diff options
context:
space:
mode:
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();
+ });
}