mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-07 23:22:48 +08:00
改进Route类的setRule方法 兼容PHP7以下版本
This commit is contained in:
@@ -257,7 +257,8 @@ class Route
|
|||||||
protected static function setRule($rule, $route, $type = '*', $option = [], $pattern = [], $group = '')
|
protected static function setRule($rule, $route, $type = '*', $option = [], $pattern = [], $group = '')
|
||||||
{
|
{
|
||||||
if (is_array($rule)) {
|
if (is_array($rule)) {
|
||||||
list($name, $rule) = $rule;
|
$name = $rule[0];
|
||||||
|
$rule = $rule[1];
|
||||||
}
|
}
|
||||||
if ('$' == substr($rule, -1, 1)) {
|
if ('$' == substr($rule, -1, 1)) {
|
||||||
// 是否完整匹配
|
// 是否完整匹配
|
||||||
|
|||||||
Reference in New Issue
Block a user