Skip to content

Commit 9e8d2d2

Browse files
author
Marc Teyssier
committed
Add possibility of middleware from php code
1 parent e25fa92 commit 9e8d2d2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Mouf/Mvc/Splash/Routers/Router.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,11 @@ class Router implements RouterInterface
3030
/**
3131
* @Important IfSet
3232
*
33-
* @param MiddlewareInterface $middleware The PSR-7 middleware to call
33+
* @param MiddlewareInterface|callable $middleware The PSR-7 middleware to call
3434
* @param string $path The path to that middleware (defaults to /).
3535
* @param ConditionInterface $enableCondition Whether the middleware must be enabled or not.
3636
*/
37-
public function __construct(MiddlewareInterface $middleware, $path = '/', ConditionInterface $enableCondition = null)
37+
public function __construct($middleware, $path = '/', ConditionInterface $enableCondition = null)
3838
{
3939
$this->path = $path;
4040
$this->middleware = $middleware;

0 commit comments

Comments
 (0)