首页路由与 URLRoute 方法族
Route 方法族
Route 实例的路径操作与输出方法

方法清单

方法签名说明
__construct($input="")解析路径
setPathsetPath($path)重新解析路径
setRoutesetRoute($name,$value)设置段:m/c/a 特判,其余进 __dataer
setRoutessetRoutes($routes)批量设置(支持 query 字符串)
getModulegetModule($ishump=true)模块名(code2hump)
getControllergetController($ishump=true)控制器名
getActiongetAction($ishump=true)动作名
getExtragetExtra()额外参数数组
getPathgetPath($withHump=false)"/mod/ctl/act" 路径
getPathDeepgetPathDeep($deep=0)从 deep 起的路径(hump2code 小写)
toArray / toUrltoArray() / toUrl()数组形式 / URL 形式
典型用法
// Url 类内部使用示例
$route = new Route("/Home/Goods/Detail");
$route->setPath($this->__path);
$route->setRoutes($this->__querys);
$url = $route->getPathDeep() . "?" . $route->toUrl();
KuoqiPHP v1.05 · 离线静态文档 · 界面基于 KuoqiUI · 返回首页