Added setMiddleware deprecated method in Route class.

This commit is contained in:
Simon Sessingø
2017-07-08 11:42:27 +02:00
parent b07348a3df
commit 5151461a02
+14
View File
@@ -484,6 +484,20 @@ abstract class Route implements IRoute
return $this;
}
/**
* Add middleware class-name
*
* @deprecated This method is deprecated and will be removed in the near future.
* @param IMiddleware|string $middleware
* @return static
*/
public function setMiddleware($middleware)
{
$this->middlewares[] = $middleware;
return $this;
}
/**
* Add middleware class-name
*