$name
$name : string
路由规则
check(\think\route\Request $request, string $url, string $depr = '/', boolean $completeMatch = false) : \think\route\Dispatch
检测路由
\think\route\Request | $request | 请求对象 |
string | $url | 访问地址 |
string | $depr | 路径分隔符 |
boolean | $completeMatch | 路由是否完全匹配 |
parseRule(\think\Request $request, string $rule, string $route, string $url, array $option = array(), array $matches = array()) : \think\route\Dispatch
解析匹配到的规则路由
\think\Request | $request | 请求对象 |
string | $rule | 路由规则 |
string | $route | 路由地址 |
string | $url | URL地址 |
array | $option | 路由参数 |
array | $matches | 匹配的变量 |
__construct(\think\Route $router, \think\route\RuleGroup $group, string|array $name, string|\Closure $route, string $method = '*', array $option = array(), array $pattern = array())
架构函数
\think\Route | $router | 路由实例 |
\think\route\RuleGroup | $group | 路由所属分组对象 |
string|array | $name | 路由规则 |
string|\Closure | $route | 路由地址 |
string | $method | 请求类型 |
array | $option | 路由参数 |
array | $pattern | 变量规则 |
checkCrossDomain(\think\Request $request) : \think\route\Dispatch|void
检查OPTIONS请求
\think\Request | $request |
parseRequestCache(\think\Request $request, string|array $cache) : void
处理路由请求缓存
\think\Request | $request | 请求对象 |
string|array | $cache | 路由缓存 |
autoValidate(array $option, \think\Request $request) : void
验证数据
array | $option | |
\think\Request | $request |
dispatch(\think\Request $request, mixed $route, array $option) : \think\route\Dispatch
发起路由调度
\think\Request | $request | Request对象 |
mixed | $route | 路由地址 |
array | $option | 路由参数 |
checkOption(array $option, \think\Request $request) : boolean
路由检查
array | $option | 路由参数 |
\think\Request | $request | Request对象 |
checkRule(\think\route\Request $request, string $url, string $depr, boolean $completeMatch = false, array $option = array()) : array|false
检测路由规则
\think\route\Request | $request | 请求对象 |
string | $url | URL地址 |
string | $depr | URL分隔符(全局) |
boolean | $completeMatch | 路由是否完全匹配 |
array | $option | 路由参数 |