Browse Source

added setup method

tags/0.1.0
Robin Thoni 9 years ago
parent
commit
9bf03735e6
1 changed files with 13 additions and 0 deletions
  1. 13
    0
      src/Doc/Business/LuDocBusiness.php

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

14
 
14
 
15
 class LuDocBusiness
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
     private static function getBusinesses()
30
     private static function getBusinesses()
18
     {
31
     {
19
         $route = LuRoute::getInstance();
32
         $route = LuRoute::getInstance();

Loading…
Cancel
Save