|
@@ -3,6 +3,11 @@
|
3
|
3
|
namespace Luticate\Utils;
|
4
|
4
|
|
5
|
5
|
class LuRoute {
|
|
6
|
+
|
|
7
|
+ const REG_UINT = "[0-9]+";
|
|
8
|
+ const REG_INT = "\\-?" . self::REG_INT;
|
|
9
|
+ const REG_BOOL = "true|false";
|
|
10
|
+
|
6
|
11
|
/**
|
7
|
12
|
* @var string[]
|
8
|
13
|
*/
|
|
@@ -44,7 +49,7 @@ class LuRoute {
|
44
|
49
|
$this->middleware[] = $middleware;
|
45
|
50
|
}
|
46
|
51
|
|
47
|
|
- private function getOptions($method, $url, $business, $method, $permissions, $middleware)
|
|
52
|
+ private function getOptions($httpMethod, $url, $business, $method, $permissions, $middleware)
|
48
|
53
|
{
|
49
|
54
|
if (!is_array($permissions)) {
|
50
|
55
|
$permissions = array($permissions);
|
|
@@ -68,7 +73,7 @@ class LuRoute {
|
68
|
73
|
$route->setBusinessClass($business);
|
69
|
74
|
$route->setMiddlware($middleware_string);
|
70
|
75
|
$route->setPermissions($permissions);
|
71
|
|
- $route->setMethod($method);
|
|
76
|
+ $route->setMethod($httpMethod);
|
72
|
77
|
$this->routes[] = $route;
|
73
|
78
|
|
74
|
79
|
return [function() use($business, $method)
|