php 5.3 compatibility for \OC\AppFramework\DependencyInjection\DIContainer
This commit is contained in:
parent
8a06f2e128
commit
7bd5352509
1 changed files with 3 additions and 2 deletions
|
@ -89,11 +89,12 @@ class DIContainer extends SimpleContainer implements IAppContainer{
|
||||||
return new SecurityMiddleware($c['API'], $c['Request']);
|
return new SecurityMiddleware($c['API'], $c['Request']);
|
||||||
});
|
});
|
||||||
|
|
||||||
$this['MiddlewareDispatcher'] = $this->share(function($c){
|
$middleWares = $this->middleWares;
|
||||||
|
$this['MiddlewareDispatcher'] = $this->share(function($c) use ($middleWares) {
|
||||||
$dispatcher = new MiddlewareDispatcher();
|
$dispatcher = new MiddlewareDispatcher();
|
||||||
$dispatcher->registerMiddleware($c['SecurityMiddleware']);
|
$dispatcher->registerMiddleware($c['SecurityMiddleware']);
|
||||||
|
|
||||||
foreach($this->middleWares as $middleWare) {
|
foreach($middleWares as $middleWare) {
|
||||||
$dispatcher->registerMiddleware($middleWare);
|
$dispatcher->registerMiddleware($middleWare);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue