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:
Bernhard Posselt 2014-04-10 20:24:30 +02:00
commit 2fc6fb36ad
2 changed files with 5 additions and 5 deletions

View File

@ -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);
}

View File

@ -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