Router
class Router
Properties
protected Route | $defaultRoute | 默认路由. |
|
protected RouteCollection | $routeCollection | 路由集合. |
|
protected array | $groupStack | 路由组属性栈. |
Methods
string
getGroupPattern(string $pattern)
获取路由组 pattern.
array
getGroupMiddleware()
获取路由组中间件.
bool
updateGroupStack(array $attributes)
更新路由组栈.
mixed
__call(string $name, array $arguments)
No description
Details
at line 40
__construct(Route $defaultRoute, RouteCollection $routeCollection)
No description
at line 54
Route
match(string|string[] $methods, string $pattern, null $to = null)
添加任意请求路由.
at line 79
Route
any(string|string[] $methods, string $pattern, null $to = null)
添加任意请求路由.
at line 91
Route
get(string $pattern, null $to = null)
添加 get 求路由.
at line 103
Route
post(string $pattern, null $to = null)
添加 post 请求路由.
at line 115
Route
put(string $pattern, null $to = null)
添加 put 请求路由.
at line 127
Route
delete(string $pattern, null $to = null)
添加 delete 请求路由.
at line 140
Route
options(string $pattern, null $to = null)
添加 options 请求路由.
at line 152
Route
patch(string $pattern, null $to = null)
添加 patch 请求路由.
at line 162
protected string
getGroupPattern(string $pattern)
获取路由组 pattern.
at line 170
protected array
getGroupMiddleware()
获取路由组中间件.
at line 180
protected bool
updateGroupStack(array $attributes)
更新路由组栈.
at line 200
Router
group(array $attributes, callable $callback)
路由组.
at line 216
mixed
__call(string $name, array $arguments)
No description