Merge pull request #8139 from owncloud/fix-middleware-registration
register middleware as string to not force request to be instantiated to...
This commit is contained in:
commit
2fc6fb36ad
|
@ -98,7 +98,7 @@ class DIContainer extends SimpleContainer implements IAppContainer{
|
|||
$dispatcher->registerMiddleware($c['SecurityMiddleware']);
|
||||
|
||||
foreach($middleWares as $middleWare) {
|
||||
$dispatcher->registerMiddleware($middleWare);
|
||||
$dispatcher->registerMiddleware($c[$middleWare]);
|
||||
}
|
||||
|
||||
return $dispatcher;
|
||||
|
@ -133,10 +133,10 @@ class DIContainer extends SimpleContainer implements IAppContainer{
|
|||
}
|
||||
|
||||
/**
|
||||
* @param Middleware $middleWare
|
||||
* @param string $middleWare
|
||||
* @return boolean|null
|
||||
*/
|
||||
function registerMiddleWare(Middleware $middleWare) {
|
||||
function registerMiddleWare($middleWare) {
|
||||
array_push($this->middleWares, $middleWare);
|
||||
}
|
||||
|
||||
|
|
|
@ -50,10 +50,10 @@ interface IAppContainer extends IContainer{
|
|||
function getServer();
|
||||
|
||||
/**
|
||||
* @param Middleware $middleWare
|
||||
* @param string $middleWare
|
||||
* @return boolean
|
||||
*/
|
||||
function registerMiddleWare(Middleware $middleWare);
|
||||
function registerMiddleWare($middleWare);
|
||||
|
||||
/**
|
||||
* @return boolean
|
||||
|
|
Loading…
Reference in New Issue