浏览代码

added setup method

tags/0.1.0
Robin Thoni 9 年前
父节点
当前提交
9bf03735e6
共有 1 个文件被更改,包括 13 次插入0 次删除
  1. 13
    0
      src/Doc/Business/LuDocBusiness.php

+ 13
- 0
src/Doc/Business/LuDocBusiness.php 查看文件

@@ -14,6 +14,19 @@ use ReflectionMethod;
14 14
 
15 15
 class LuDocBusiness
16 16
 {
17
+    /**
18
+     * @param $prefix string
19
+     */
20
+    public static function setupRoutes($prefix = "/luticate")
21
+    {
22
+        $ns = 'Luticate\Doc\Business\\';
23
+
24
+        $route = LuRoute::getInstance();
25
+        $route->get("$prefix/doc", "${ns}LuDocBusiness", "index");
26
+        $route->get("$prefix/doc/{business}", "${ns}LuDocBusiness", "business");
27
+        $route->get("$prefix/doc/{business}/{method}", "${ns}LuDocBusiness", "method");
28
+    }
29
+
17 30
     private static function getBusinesses()
18 31
     {
19 32
         $route = LuRoute::getInstance();

正在加载...
取消
保存