所在的位置: php >> php前景 >> 2022110thinkphp源码无

2022110thinkphp源码无

北京中科白癜风医院地址 https://wapjbk.39.net/yiyuanzaixian/bjzkbdfyy/
thinkphp源码无差别阅读(十六)framework阅读think/route/Dispatch.php

属性:app、request、rule、dispatch、param

构造方法:__construct

初始化:init

执行调度:run

响应:autoResponse

检查路由后置操作:doRouteAfter

路由绑定过模型:createBindModel

验证数据:autoValidate

获取调度:getDispatch

获取参数:getParam

执行:exec

休眠:__sleep

唤醒:__wakeup

debug信息:__debugInfo

think/route/Domain.php

构造方法:__construct

检测域名路由:check

设置路由绑定:bind

检测url绑定:checkUrlBind

解析绑定参数:parseBindAppendParam

绑定到类:bindToClass

绑定到命名空间:bindToNamespace

绑定到控制器:bindToController

think/route/Resource.php

属性:resource、route、rest、model、validate、middleware

构造方法:__construct

生成资源路由规则:buildResourceRule

设置资源允许:only

设置资源排除:except

设置资源路由的变量:vars

绑定资源验证:withValidate

绑定资源模型:withModel

绑定资源中间件:withMiddleware

rest方法定义和修改

think/route/Rule.php

属性:name、domain、router、parent、rule、method、vars、option、pattern、mergeOptions

检查:check

设置路由参数:option

设置路由参数:setOption

注册变量规则:pattern

设置标识:name

获取路由对象:getRouter

获取路由标识:getName

获取当前路由规则:getRule

获取当前路由


转载请注明:http://www.aierlanlan.com/cyrz/8774.html