|
@@ -11,7 +11,6 @@ namespace Luticate\Doc\Business;
|
11
|
11
|
use Luticate\Utils\LuRoute;
|
12
|
12
|
use Luticate\Utils\LuRouteDbo;
|
13
|
13
|
use ReflectionMethod;
|
14
|
|
-use Twig_Autoloader;
|
15
|
14
|
use Twig_Environment;
|
16
|
15
|
use Twig_Loader_Filesystem;
|
17
|
16
|
|
|
@@ -91,10 +90,16 @@ class LuDocBusiness
|
91
|
90
|
$business_tiwg["routes"] = [];
|
92
|
91
|
|
93
|
92
|
foreach ($businesses as $business) {
|
|
93
|
+ $reflection = new ReflectionMethod($business->getBusinessClass(), $business->getBusinessMethod());
|
|
94
|
+ $description = $reflection->getDocComment();
|
|
95
|
+ if ($description === false) {
|
|
96
|
+ $description = "No description available";
|
|
97
|
+ }
|
94
|
98
|
$business_tiwg["routes"][] = [
|
95
|
99
|
"method" => $business->getMethod(),
|
96
|
100
|
"url" => $business->getUrl(),
|
97
|
|
- "businessMethod" => $business->getBusinessMethod()
|
|
101
|
+ "businessMethod" => $business->getBusinessMethod(),
|
|
102
|
+ "description" => $description
|
98
|
103
|
];
|
99
|
104
|
}
|
100
|
105
|
$businesses_tiwg[] = $business_tiwg;
|
|
@@ -105,8 +110,6 @@ class LuDocBusiness
|
105
|
110
|
$template = $twig->loadTemplate("index.html.twig");
|
106
|
111
|
$content = $template->render(array("businesses" => $businesses_tiwg));
|
107
|
112
|
echo $content;
|
108
|
|
-
|
109
|
|
-
|
110
|
113
|
exit;
|
111
|
114
|
}
|
112
|
115
|
|