yaf
yaf copied to clipboard
Yaf_Route_Static(default route) 在多模块的路由判断不准确
// 假设配置
$conf = array(
"application" => array(
"modules" => "Index,Blog",
),
);
路由结果如下: Module + controller + action: http://example/blog/archive/list module == blog controller == archive action == list
Module + controller: http://example/blog/archive module == null controller == blog action == archive
Module http://example/blog/ module == null controller == blog action == null
可以自己写一个以 /Module/Controller/Action
方式优先的路由器, 而不是 Yaf 自带的 /c/a
优先
我也遇到了这个问题, 这应该是一个bug。
module == null 其实是 module == index模块 是优先匹配的 然后才匹配其他的 没毛病