Sfoglia il codice sorgente

added setup method

tags/0.1.0
Robin Thoni 9 anni fa
parent
commit
9bf03735e6
1 ha cambiato i file con 13 aggiunte e 0 eliminazioni
  1. 13
    0
      src/Doc/Business/LuDocBusiness.php

+ 13
- 0
src/Doc/Business/LuDocBusiness.php Vedi File

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

Loading…
Annulla
Salva