\ThinkRoute

ThinkPHP路由解析类

Summary

Methods
Properties
Constants
check()
reverse()
ruleCache()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
checkOption()
checkUrlMatch()
invoke()
No private properties found
N/A

Methods

check()

check(array  $paths = array()) : boolean

路由检测

Parameters

array $paths

path_info数组

Returns

boolean

reverse()

reverse(string  $path, array  $vars, string  $depr, string|true  $suffix = true) : string|false

路由反向解析

Parameters

string $path

控制器/方法

array $vars

url参数

string $depr

分隔符

string|true $suffix

url后缀

Returns

string|false

ruleCache()

ruleCache(boolean  $update = false) : array

读取规则缓存

Parameters

boolean $update

是否更新

Returns

array

checkOption()

checkOption(array  $options, string|true  $suffix = true) : boolean

路由参数检测

Parameters

array $options

路由参数

string|true $suffix

URL后缀

Returns

boolean

checkUrlMatch()

checkUrlMatch(string  $rule, array  $args, string  $regx) : array|false

检测URL和路由规则是否匹配

Parameters

string $rule

路由规则

array $args

路由动态变量

string $regx

URL地址

Returns

array|false

invoke()

invoke(\Think\function  $closure, array  $var = array()) : boolean

执行闭包方法 支持参数调用

Parameters

\Think\function $closure

闭包函数

array $var

传给闭包的参数

Returns

boolean