Pārlūkot izejas kodu

added setup method

tags/0.1.0
Robin Thoni 9 gadus atpakaļ
vecāks
revīzija
9bf03735e6
1 mainītis faili ar 13 papildinājumiem un 0 dzēšanām
  1. 13
    0
      src/Doc/Business/LuDocBusiness.php

+ 13
- 0
src/Doc/Business/LuDocBusiness.php Parādīt failu

@@ -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();

Notiek ielāde…
Atcelt
Saglabāt