###*路由方法匹配函数*
* * * * *
Route::get($param, $func, array $args = [], bool $aiload = false) : void;
Route::post($param, $func, array $args = [], bool $aiload = false) : void;
Route::ajax($param, $func, array $args = [], bool $aiload = false) : void;
Route::method(array $method, $param, $func, array $args = [], bool $aiload = false) : void;
###*参数匹配*
* * * * *
格式:
+ **string**
+ **string(string)/value_name(roule)/value_name(roule)**
+ **string(string)@?get1(roule)&get2(roule)**
+ **string(string)@#post1(roule)&post1(roule)**
+ **string(string)@#post1(roule)?get1(roule)**
+ **string(string)/value_name(roule)/...@?id(roule)&...#name(roule)&...**
> 注解
第一个string为定值匹配
之后value_name按照括号中对应路由规则匹配
匹配成功则添置get参数中,名称为value_name,优先级最高,覆盖正常get传参
@之后为get或post参数检测,?接get#接post,&连接,括号中为检测规则
//例:
Route::get('novel/novel(string)/number(int), 'View@showNovel@?novel&number');
//匹配novel/任意字符串(路由规则string)/任意数字(路由规则int)
//www.example.com/novel/ceshixiaoshuo/1
//调用View->showNovel('ceshixiaoshuo',1);
###*类函数传参*
* * * * *
格式:
+ **class@method**
+ **class@method@?get1&get2**
+ **class@method@#post1&post2**
+ **class@method[@?get1&get2#post1&post2]**
**如果不存在则传值null**
Index@index ----> 当前命名空间//Index类index方法
Index@index@?id&name ----> 并传递$_GET['id'],$_GET['name']
Index@index@#id&name ----> 并传递$_POST['id'],$_POST['name']
Index@index@?id#name ----> 并传递$_GET['id'],$_POST['name']
###*方法匹配实例*
* * * * *
Route::get(':empty', function () {
code......
});
Route::get('index','Index@index');
Route::get('test','Index@test');
Route::get('empty',function(int $number){
echo $number;
},[1]);
Route::get('page/id(:int)', 'Index@page@?id');
Route::post('edit', 'Index@edit@#text');



