Properties

$app

$app : \think\App

应用对象

Type

\think\App

$dispatch

$dispatch : mixed

调度信息

Type

mixed

$param

$param : array

调度参数

Type

array

$code

$code : string

状态码

Type

string

$convert

$convert : boolean

是否进行大小写转换

Type

boolean

Methods

__construct()

__construct(\think\Request  $request, \think\route\Rule  $rule,   $dispatch,   $param = array(),   $code = null) 

Parameters

\think\Request $request
\think\route\Rule $rule
$dispatch
$param
$code

init()

init() 

run()

run() : mixed

执行路由调度

Returns

mixed

convert()

convert(  $convert) 

Parameters

$convert

getDispatch()

getDispatch() 

getParam()

getParam() 

exec()

exec() 

__sleep()

__sleep() 

__wakeup()

__wakeup() 

__debugInfo()

__debugInfo() 

doRouteAfter()

doRouteAfter() : void

检查路由后置操作

autoResponse()

autoResponse(  $data) 

Parameters

$data

checkAfter()

checkAfter(mixed  $after) : mixed

检查路由后置行为

Parameters

mixed $after

后置行为

Returns

mixed

autoValidate()

autoValidate(array  $option) : void

验证数据

Parameters

array $option

Throws

\think\exception\ValidateException

parseRequestCache()

parseRequestCache(string|array  $cache) : void

处理路由请求缓存

Parameters

string|array $cache

路由缓存

createBindModel()

createBindModel(array|\Clousre  $bindModel, array  $matches) : void

路由绑定模型实例

Parameters

array|\Clousre $bindModel

绑定模型

array $matches

路由变量

parseUrl()

parseUrl(string  $url) : array

解析URL地址

Parameters

string $url

URL

Returns

array

hasDefinedRoute()

hasDefinedRoute(string  $route, string  $bind) : boolean

检查URL是否已经定义过路由

Parameters

string $route

路由信息

string $bind

绑定信息

Returns

boolean

autoFindController()

autoFindController(string  $module, array  $path) : string

自动定位控制器类

Parameters

string $module

模块名

array $path

URL

Returns

string