Method |
Description |
|
alias ( string | array $rule = null, string $route = '', array $option = [] ) : void |
注册别名路由 |
|
any ( string $rule, string $route = '', array $option = [], array $pattern = [] ) : void |
注册路由 |
|
auto ( string $route ) : void |
注册一个自动解析的URL路由 |
|
bind ( mixed $bind, string $type = 'module' ) : mixed |
设置路由绑定 |
|
bindToClass ( string $url, string $class, string $depr = '/' ) : array |
绑定到类 |
|
bindToController ( string $url, string $controller, string $depr = '/' ) : array |
绑定到控制器类 |
|
bindToModule ( string $url, $controller, string $depr = '/' ) : array |
绑定到模块/控制器 |
|
bindToNamespace ( string $url, string $namespace, string $depr = '/' ) : array |
绑定到命名空间 |
|
check ( think\Request $request, string $url, string $depr = '/', boolean $checkDomain = false ) : false | array |
检测URL路由 |
|
checkDomain ( think\Request $request, array &$currentRules, string $method = 'GET' ) : void |
检测子域名部署 |
|
controller ( string $rule, string $route = '', array $option = [], array $pattern = [] ) : void |
注册控制器路由 操作方法对应不同的请求后缀 |
|
delete ( string $rule, string $route = '', array $option = [], array $pattern = [] ) : void |
注册DELETE路由 |
|
domain ( string | array $domain, mixed $rule = '', array $option = [], array $pattern = [] ) : void |
注册子域名部署规则 |
|
get ( string $rule, string $route = '', array $option = [], array $pattern = [] ) : void |
注册GET路由 |
|
getBind ( string $type ) : mixed |
读取路由绑定 |
|
getGroup ( string $type ) : mixed |
获取当前的分组信息 |
|
group ( string | array $name, array | Closure $routes, array $option = [], array $pattern = [] ) : void |
注册路由分组 |
|
import ( array $rule, string $type = '*' ) : void |
导入配置文件的路由规则 |
|
miss ( string $route, string $method = '*', array $option = [] ) : void |
注册未匹配路由规则后的处理 |
|
name ( string | array $name = '', array $value = null ) : array |
设置或者获取路由标识 |
|
parseUrl ( string $url, string $depr = '/', boolean $autoSearch = false ) : array |
解析模块的URL地址 [模块/控制器/操作?]参数1=值1&参数2=值2. |
|
patch ( string $rule, string $route = '', array $option = [], array $pattern = [] ) : void |
注册PATCH路由 |
|
pattern ( string | array $name = null, string $rule = '' ) : void |
注册变量规则 |
|
post ( string $rule, string $route = '', array $option = [], array $pattern = [] ) : void |
注册POST路由 |
|
put ( string $rule, string $route = '', array $option = [], array $pattern = [] ) : void |
注册PUT路由 |
|
resource ( string $rule, string $route = '', array $option = [], array $pattern = [] ) : void |
注册资源路由 |
|
rest ( string $name, $resource = [] ) : void |
rest方法定义和修改 |
|
rule ( string $rule, string $route = '', string $type = '*', array $option = [], array $pattern = [] ) : void |
注册路由规则 |
|
rules ( mixed $rules = '' ) : array |
获取或者批量设置路由定义 |
|
setGroup ( string $name, array $option = [], array $pattern = [] ) : void |
设置当前的路由分组 |
|
setMethodPrefix ( string $method, string $prefix = '' ) : void |
设置不同请求类型下面的方法前缀 |
|