mirror of
https://github.com/skipperbent/simple-php-router.git
synced 2026-07-11 08:22:19 +00:00
Added setMiddleware deprecated method in Route class.
This commit is contained in:
@@ -484,6 +484,20 @@ abstract class Route implements IRoute
|
|||||||
return $this;
|
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
|
* Add middleware class-name
|
||||||
*
|
*
|
||||||
|
|||||||
Reference in New Issue
Block a user